Displaying selection criteria in your report header
One of the most powerful features in Crystal Reports is the ability to allow users to set selection criteria on demand. For instance you may want to run sales reports for a specific territory, region or sales rep, or HR reports for a specific department or subset of employees.
Using parameters allows you to use the same report structure, while allowing the end user to create the underlying data set with their own selection criteria. It’s important to change the report headers to reflect the actual data set, so that users are clear about the subset of data that they are working with. Once you’ve set up your parameter fields (learn this in our Crystal Reports Advanced course), it’s handy to customize the report header text to reflect the selection criteria in the heading. In the example below, a sales report has parameters set to show the last 4 transactions, during a specific date range, for selected employees. The headings utilize the parameter field values to reflect the exact selection criteria applied.
The Includes Employees line in the report header uses a formula called “Display Employee”. Each time the user selects a different combination of employees the heading will change to reflect the selection.