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

Preventing users being prompted

Status
Not open for further replies.

KidFix

Programmer
Feb 7, 2002
60
US
I've got a few prompts in my report, and I normally pass values for each prompt in the URL i.e. /myreport.rpt?prompt0=blah&prompt1=poo etc. but I want it so that if I don't pass a parameter, the user is not then prompted for a value by crystal. Is there any way of doing this.

Thanks in advance
 
If you don't pass a parameter CR is going to prompt, because the parameter is needed by the report. What value is the report supposed to use if there is no parameter passed from the URL or user? Can you pass a default value when nothing else applies? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi and thanks for the reply

The parameters are numbers, I know that with a string if you default to '*' you can return all records, but how can I achieve this with a number?

Thanks
 
By putting in a default that is an unused value(like 0) , and then having the selection formula say something like

If {?prompt} = 0 then true else
{?prompt} = {Number} Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Sounds good, thanks. I have however got the problem solved by just changing the fields in the view to strings since the filter only relys on the fields being equal or not equal to the filter parameter it doesn't make a difference if its a string or a number.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top