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

"All" Option for Parameter Fields 1

Status
Not open for further replies.

cclear

Instructor
Jul 23, 2002
5
US
I am sure this question has been asked before, however I would love help with this. In earlier versions of CR, 8.5 and back, you were able to use the wildcard (**) as a Parameter option to bring back all of the records in a filtered report. We have upgraded to CR 10 and we are having a tough time with an (All) option. We have tried to add the * in the pick list field and place a description of what it is related to. However, when you use the Parameter it shows ex: *-All States* , this forces it to produce a blank report.
 
Hi,
Try using 0 (zero) or 'ALL' itself ( depending on Parameter type) then,. in the selection criteria use something like:

Code:
If {?parameter} = 'ALL' // ( or 0, depending)
Then
True
Else
If {?parameter?} <> 'ALL' 
Then
{table.field} = {?parameter}


Hope it helps..
[profile]
 
Or if you still want the wild card, then

Code:
If {?parameter} = 'ALL' // ( or 0, depending)
Then
True
Else
If {?parameter?} <> 'ALL' 
Then
{table.field} like '*'+{?parameter}+'*'


 
It can actually be a lot simpler.

The clause you want is
{?parameter} = "ALL" or
{table.field} = {?parameter}

It is a simpler boolean expression and doesn't require all the if.. then else stuff.

Editor and Publisher of Crystal Clear
 
Hi,

Does that form get passed to the Database for processing?

[profile]
 
Unfortunately if you have other criteria you need to bracket the above expression, so it won't be passed to the database.

Therefore all the records will be sent from the DB for CR to process. Sometimes you have to sacrifice a little efficiency for the flexibility you are asking for.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top