Crystal Reports – How to display selected date range parameter filter

The following steps show how to display which filters have applied to a Crystal Report in the header of the report.

For example, is the date range of 01/01/2016 to 01/01/2017 was selected when a report was ran this would be displayed in the header.

This allows the report to be printed or saved whilst communicating the limitations placed on the data in the report.

NOTE: These instructions apply specifically to a date RANGE parameter – that is, one parameter with the range option set to true.

  1. Before doing this you need to have created the parameter filters on the report.
  2. Right-click on ‘Formula Fields’ and choose ‘New’
  3. crystalreports-booleantick2
  4. Give the formula field a name, e.g. prompt_selected_dates
  5. Now enter the following formula – replace {?Date range} with ryou parameter field
  6. "Period: " & Minimum ( {?Date range} ) & " - " & Maximum ( {?Date range} )
  7. Save and close the editor
  8. Insert the formula field into the report and run the report
  9. The formula will now display the date range selected when the report was ran