A number of clients have asked me how does one display the values of the report string parameters in the heading sections of the reports.
This blog, provides some of the formulas that can be used to show the string parameter values within crystal reports report:
- Single value string parameters
“Parameter value selected “& {?Paremeter Name} - Multiple value string parameters
"Parameter values selected " & Join({?Parameter Name}, ", ")
To create a list of parameter values, one under the other:
"Parameter values selected " & Join({?Parameter Name}, ", " &chr(13))
Alternatively: Whilereadingrecords; Numbervar counter; Stringvar list; counter := count ({?Parameter Name}); While counter > 0 do
(list := list + ({?Parameter Name}[counter]) +', '+ chr(13);
counter := counter - 1); list [1 to (length (list)-2)] - Range value string parameters
"Parameter Range Selected: " & Minimum({?Parameter Name}) & " to " & Maximum({?Parameter Name})
- Range value string parameter, with no upper and/or lower bounds
If HasLowerBound ({?Parameter Name}) and HasUpperBound ({?Parameter Name})
then "Country Range: " & Minimum({?Parameter Name}) & " to " & Maximum({?Parameter Name}) Else
if HasLowerBound ({?Parameter Name}) then "Parameter Range: After "& Minimum({?Parameter Name})
else "Parameter Range: Before "& Maximum({?Parameter Name})
|