Clarity

  • 1.  Multiple input parameter in Crystal Report

    Posted Jan 07, 2011 11:47 PM
    Hello All,

    I have a created a sample Crystal Report based on following query..


    SELECT I.ID PROJECT_KEY,
    I.CODE PROJECT_ID,
    I.NAME
    FROM INV_INVESTMENTS I
    WHERE (I.ODF_OBJECT_CODE = 'project')
    AND ((( I.ID ) IN {?PARAM_PROJECT} AND 0 NOT IN {?PARAM_PROJECT}) OR 0 IN {?PARAM_PROJECT})


    1. If I enter '0' as a input parameter then it shows me all results.
    2. If I enter 'Project Id ' as a input parameter then it shows me results for that project.

    Now,I changed the Parameter setting : - Made Allow Multiple Values True. Now if i enter two project ID, then i am expecting result for that two project,But it shows 'Failed to retrieve data from database'


    Could anyone help me, how to achieve this.

    Thanks in Advance :-)

    Regards,
    Deepak


  • 2.  RE: Multiple input parameter in Crystal Report

     
    Posted Jan 12, 2011 12:20 PM
    Hi All,

    Anyone have any ideas here for Deepak?

    Thanks!
    Chris


  • 3.  RE: Multiple input parameter in Crystal Report

    Posted Jan 26, 2011 10:08 PM
    Deepak,

    I am also having same issue. How did you use multi-select parameter in Crystal report query?


  • 4.  RE: Multiple input parameter in Crystal Report

    Posted Jan 27, 2011 06:01 AM
    Deepak,

    Crystal Reports is not capable of accepting multiple parameters at query level.

    You need to build logic in Record Selection formula. Or else you can use Stored Procedure.


    Thanks,
    Bhanu


  • 5.  RE: Multiple input parameter in Crystal Report

    Posted Jan 27, 2011 08:44 AM

    BhanuPrakash wrote:



    Crystal Reports is not capable of accepting multiple parameters at query level.

    You need to build logic in Record Selection formula. Or else you can use Stored Procedure.
    That's true; here's an example of a Record Selection formula I use:

    (if ({?param_manager}=0.00) then TRUE else ({CUSTOMVIEW.MANAGER_ID}={?param_manager})) and
    (if ({?param_project}=0.00) then TRUE else ({CUSTOMVIEW.PROJECT_ID}={?param_project}))

    Set the default value for both parameters to 0. If the Clarity user doesn't select values for either; the reports will run "wide open", displaying all rows.

    Charles