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!

Crystal reports parameters 1

Status
Not open for further replies.

SQLhell

Programmer
Feb 19, 2008
4
NL
Hi there

I need some help with a crystal report, I am using version 11.
I have create a sql command with some temporary tables and some parameters, but I dont undertstand what happens if the user doesn't want to enter a value for the parameter, the only option is to leave it blank but ofc that means my where caluse is evaluating NULL.

I want the user to be able to enter nothing if they want all records returned and maybe even skip the paramter all together if they dont need it for that particiular run.

Please advise how this is dealth with, I am a DBA normally and haven't done much reporting
 
You should add an "All" option to your parameter that corresponds to a 0 if a number, or just "All" for a string. Then set up the command like this:

(
{?parm} = 0 or
table.`number` = {?parm}
)

For a string:
(
'{?parm}' = 'All' or
table.`string` = '{?parm}'
)

You can use the prompt text to instruct users to enter "All" if they don't want a specific selection.

-LB
 
Sorry LB, I meant to say you are a $%@#ing legend!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top