SAP Knowledge Base Article - Public

1209248 - How to display the values of a range parameter in Crystal Reports?

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

  1. In Crystal Reports, create a report off any data source.
  2. Create a range parameter.
  3. Insert the range parameter on the report.
  4. 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:
      
    1. 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.      
           
    2. 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:
         
    1. Create a formula for the Lower Range Value, like: 
        
           Minimum({?ParamRange})
       
    2. Create a second formula for the Upper Range Value, like:  
        
           Maximum({?ParamRange})
        
    3. 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 BusinessViews Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016