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 take default value of parameter when not entering s

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 it will not take the default value of the parameter, the only way I can do it is through hitting select on each parameter, which instead on crystal reports [not on web] I can hit ok and it will run ok.

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
 
What version of CE?

In CE 8.5 go into the parameters tab within the CMC and set a default value.

-k
 
I use Version 9, and if I put in a default value then it will not prompt the user to enter any value on this parameter because it will take the default, but in my case I only want that the default should be taken if the user didn’t enter anything.

Thanks for your response

Joel Braver
 
Hi,
In your selection formula, test for entry and , if none, set the default value..

Like this, maybe:

Code:
If IsNull({?parameter}} then
{table.field} = <yourdefaultfalue>
else
{table.field} = {?parameter}


Should give an idea..

[profile]

 
First of all thanks for your response.

It did not exactly work for me, in any case i am not going to use CRE for now.

{sorry for delay}
 
Instead of making the default value a "", make it an ALL. Then change your record selection to ALL. We do this with several reports delivered through Enterprise and it works great. If the user wants the value of the parameter to be all, he can move right through the parameter list without choosing anything. Otherwise, he can enter the parameter he wants. Works great!
 
Hi,

I have same issue with this too. I'm using CR10 & CE10.
Seems CE is not able to read the default parameter in the runtime when scheduling unless you save the param value, it will fail all the time if you have a report with parameters but not save default parameters value before schedule it, you have to go to parameter section and save the default parameters when publishing a report. I was asked by administrator because he has more than 100 reports need to be published and it will be very frustrated for him if he needs to go to each report to set up database locations and parameter values in CE.

Any suggestions or workaround?

Thanks,

Ted

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top