Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - add "ALL" to Parameter Dynamic List of Values

Status
Not open for further replies.

mehlsl

IS-IT--Management
Jan 30, 2002
22
0
0
US
Using CR XI

Hello --

How can I add "ALL" to the list of selectable parameter values generated dynamically from a field?

OR

Can I set the source for the "Allow Multiple value" parameter list to something like this SQL, or a view containing it?
SELECT DISTINCT(PgmStatus) FROM <table> UNION SELECT 'ALL'

Thanks for any help,

Stephen Mehl
 
Yes, you can do that - that's the recommended way to add "All" to the list. I would make just a couple of minor changes:

1. Since you will want "ALL" to appear first in the list, make it " ALL" or "*ALL".
2. Add an "Order By" clause to your command to get the data in the correct order.

In the Database Expert, create a new Command that will contain the SQL for your parameter. DO NOT link the command to anything else in the report. Crystal will warn you that this is generally not supported, but it will work in this circumstance. In the parameter definition, use the field(s) from this command ONLY - do not use any fields from any other tables in your report! Outside of the parameter definition, DO NOT use any fields from this command.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
hilfy --

Thank you.
Your instructions were very clear.
This method will eliminate an administrative headache.

Do you know if any later versions of CR allow simply naming a field (contained in the source view for the report) as the dynamic parameter, and, hopefully, being able to append " ALL" to the DISTINCT list of values for that field, thereby not needing to use additional commands?

Stephen

 
No, the only way to do this that I know of is to use a separate command. And really, if you think about it, that's the most efficient way to do it - if you use your source data, Crystal will actually run the full query for your report to get the values for the dynamic parameter instead of just getting the values you need from a single table.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top