Symptom
- When inserting a range parameter on a report it displays nothing.
- How to display the values entered in a range parameter on a report in Crystal Reports?
Environment
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off any data source.
- Create a range parameter.
- Insert the range parameter on the report.
- Refresh the report, and enter values for the range parameter.
The report displays the data, but the range parameter inserted on the report returns nothing.
Resolution
- To display the upper and lower range limits of a range parameter, create a formula and uses the functions: Minimum() and Maximum() with the parameter:
- On the report, in which you have a range parameter, create a new formula like:
- For a string range parameter:
Minimum({?ParamRange}) + " To " + Maximum({?ParamRange})
- For a number range parameter:
ToText(Minimum({?ParamRange}),0) + " To " + ToText(Maximum({?ParamRange}),0)
- For a date range parameter:
ToText(Minimum({?ParamRange}),"yyyy/MM/dd") + " To " + ToText(Maximum({?ParamRange}),"yyyy/MM/dd")
Note: For different ways of formatting a Date or Number when converting it to text, see the ToText function in Crystal Reports help.
- Insert the formula into the report section where you want to display the range limits.
- Another alternative, you can create a separate formula for each range limit like:
- Create a formula for the Lower Range Value, like:
Minimum({?ParamRange})
- Create a second formula for the Upper Range Value, like:
Maximum({?ParamRange})
- Insert these formulas into the report section where you want to display the range limits.
Keywords
parameter range range limited parameters Seagate Crystal Reports Report Design Range Limited Parameter , c2002512 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016