home page
about us
consulting service
maintenance plan
training
faqs
hints and tips
resources
how to
testimonials
news
blog
case studies
clients
register
log in
contact us
This week I was asked "How does one add an All option when populating dynamic list of values for parameters in Crystal Reports?"
To create an All option in a dynamic list of values for a parameter, to allow the user to return all the required customers based on their country of residence.
Create the data source using the Union SQL statement:
Select Country from Customers Union Select "All" from Customers
Select Country from Customers
Union
Select "All" from Customers
Note: To rename the Command, click on the name twice and overtype the Command name
Create the Parameter, using the Command statement data source:
Create a select criteria for the report, using the parameter:
If {?Select Country} = "All" then True else {Customer.Country} = {?Select Country}:
Create a formula that displays the values of the parameters selected by the user:
"Selected Countries: "& Join({?Select Country}, ", ")