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!

How to Select all 1

Status
Not open for further replies.

charltonc

IS-IT--Management
Mar 2, 2004
23
CA
Hi

How do you configure parameters to choose to filter for specific values as well as all values?
 
Hi
Try
Code:
If {?parameter} = "" then
True 
else
{table.field} = {?parameter

Repeat as needed for each parameter...

[profile]
 
Turkbear, that code won't be processed on the server.

Charltonc - add an "All" value to your picklist for the parameter and make it the default (first) vavlue. Then, use the following code:
Code:
(
  If
    {?Parameter} <> "All"
  Then
    {table.fieldvalue} = {?Parameter}
  Else If
    {?Parameter} = "All"
  Then
    True
)
This code forces Crystal to pass the criteria to the server.


~Kurt
 
Hi,
Thanks, I usually use the format you posted, but, for some reason, today I seem to be reverting to the older one I used to use..( Must be having just returned from 2 weeks vacation)[smile]

[profile]

 
Thanks,
But what does "True" tell Crystal Report to do?

it tells CR to spit out all the values?
 
Hi, Basically yes, for the field the parameter is applied to
- all selection critera formulas are treated as Boolean logic - if the criterion is matched, a True is returned, else a False is..By explicitly coding a True, you avoid the overhead of checking the value.

[profile]
 
I get that way, too Turk;-) Welcome back and hope you had fun!


~Kurt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top