Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Answer the easy questions first
 
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

08
March

Crystal Reports String Parameter Formulas

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})

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

82 + 87 =