Symptom
How to pass multiple custom values to a parameter in Crystal Reports?
Environment
- Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Resolution
- Launch Crystal Reports designer
- Create a report based on any database
- Create a parameter and set the "Allow Multiple Values" option of the parameter to False
- Go to Report menu>> Select Expert >> Record.
- Select the field for which the filter is to be applied.
- From the drop down, select 'Formula:'
- If the 'Data Type' of the field is 'Number', enter the following formula:
totext(<fieldname>,0)in split(<parameter>,",")
If the 'Data Type' of the field is 'String', enter the following formula:
totext(<fieldname>)in split(<parameter>,",") - Click on OK.
- Now, refresh the report and enter multiple values seperated by comma(,).
- The report should work fine and filter the data depending on the values entered.
Note: Please find the Sample report from the attachments.
Keywords
multiple values, parameter, cr, crystal, multiple custom values, crystal reports , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016
Attachments
sample(1).rpt |