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!

Crystal enterprise default value of parameter when not selecting

Status
Not open for further replies.

bhphoto

IS-IT--Management
Jul 30, 2003
57
CH
Hi there,

How are you today?

I created a report with a lot of parameters and in the record selection I added the following:
{PARAMETER} = “ “
or {PARAMETER} = {DB.Field}, and in the default values I added the first value as blank so If the user does not enter a value for this parameter it will give all records [or I can put in any other default instead], this eliminates the user should have to fill out all parameters if he doesn’t want to.

But in Crystal enterprise on the web I cannot do this because the options are either to set default report parameters OR allow user to be prompted to enter parameters every time the report is run. But I cannot have both that it should take the default value if the user didn’t enter any value on this parameter.


Any idea how I can make that enterprise should take default value if I don’t enter anything in the parameter?

Your help is very much appreciated.


Joel Braver
 
Try something like ( as your Seletion Criteria)

If (IsNull({?Parameter}) or
{?Parameter} = ""
)
then
{DB.Field} = <YourDefaultValueHardCodedHere>
Else
{DB.Field} = {?Parameter}


[profile]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top