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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add "all" to parameter field pick list 2

Status
Not open for further replies.

nes105

Technical User
Jan 15, 2004
14
US
Often I find that I need to select all items from a parameter field pick list when running a report. I would like the option of selecting "all" from the pick list in order to select all values from the list.

Thanks
 
Add "ALL" to the default list.

Change the record selection formula to something like:
----------------------------------------
({?Parm} = "ALL") OR ({field} = {?Parm})
----------------------------------------

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
That would depend on whether the picklist is inclusive of all items in the table, or just all items in the picklist.

If you want all items in the picklist, create a value called "All" in the defaults, and modify the report->Edit selection formula->record to:

(
if {?Parm} <> &quot;ALL&quot; then
{table.field} = {?Parm}
else
if {?Parm} = &quot;ALL&quot; then
true
)

Note that the parentheticals and double qualification of the ALL in the IF and the ELSE are to assure SQL pass through (Check with Database->Show SQL).

Assuring pass through SQL is based on your version of Crystal, which is generally a good idea to post when requesting technical information.

-k
 
Thanks for the help. Works great! I can put the info you provided to good use in several reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top