Crystal Reports – How to display selected parameter values

The following steps show how to display selected parameter values in a Crystal Report.

For example, when running a report a parameter value is used to filter the report results – in this example, names of users.

This can make a report easier for people to understand when a filter has been applied – so there is an understanding of the limits applied to the displayed report.

  1. Right-click on ‘Formula Fields’ and choose ‘New’
  2. crystalreports-booleantick2
  3. Give the formula field a name, e.g. prompt_selected_name
  4. Now enter the following formula – replace {?prompt_name} with you parameter field
  5. join({?prompt_name},',')
  6. Save and close the editor
  7. Insert the formula field into the report and run the report
  8. crystalreports-displayselectedparameters1

 

Bonus formatting tip

To display each selected parameter on it’s own line, set the formula to

join({?prompt_name},',' + Chr(10))

and enable ‘Can Grow’ in the field formatting. (Right-click on the field, Format Field, Common tab, tick ‘Can Grow’)

crystalreports-displayselectedparameters2

Was this article helpful?

Related Articles