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

Adding the formula to the Parameters fields 1

Status
Not open for further replies.

Ann28

MIS
Apr 2, 2004
97
US
Hello,

I have a check_type parameter field on the report.
(allowed multiple values)
The user is prompt to choose V or P.

If the user would not select any only records with P
option will be displayed on the screen.

if the user did not select anything P & V should be displayed.

It should be a formula I think if the parameter is empty then display all P & V.

REALLY, APPRECIATE YOUR HELP!!!!
 
Your post is confusing.

This sentence in particular: "If the user would not select any only records with P
option will be displayed on the screen."

Then the next line states that if they choose nothing then display everything, which contradicts this.

You'll find that it's easier to overcome language barriers if you post technical information instead of descriptions:

Crystal version
Database/connectivity used
Example data
Expected output

I'd guess that you should prefill the parameter with the choices: "All", "P" and "V"

Now in the Report->Edit Selection Formula->Record use the following formula:

(
If {?MyParm} <> "All" then
{Table.field} = {?MyParm} <> "All" then
else
If {?MyParm} = "All" then
true
)

Note that I intentionally requalify the conditional for "All" as = to assure SQL passthrough to the database.

-k
 
i had to add another parm with "all" option
 
Sorry, I copied poorly, should read:

(
If {?MyParm} <> "All" then
{Table.field} = {?MyParm} then
else
If {?MyParm} = "All" then
true
)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top