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

Optional Paramters in crystal

Status
Not open for further replies.

sillysod

Technical User
Jan 6, 2004
300
GB
Could anoyone tell me how to make a crystal parameter optional
I have two parameters where i want the user to be able to specify a list of values he wishes to filter the report on, but there will be occasions when he does not wish to filter the report and so wont enter anything

Im sure im missing something obvious
 
You should post this in the crystal forum, not the VB.Net forum.

I use Stored Procedures with all of my crystal reports. That way if I run into something like this I can just send the stored crystal a blank value and check for that in my stored procedure. If blank then Select * From Table Else Select * From Table Where This = That.
 
Silly, When you set up the parameter in Crystal, give it a default value. Or, when you set the value from VB, assign it to something that will not effect the report, or assign it to a value that indicates that it shouldn't be used then in crystal check for that value befor using it.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Thanks for the replies, reason i posted it here is because i work with the retail version of crystal from time to time and dont recall ever having this problem
 
Ok, I have just been playing and this still wont work.

The parameters are multiple discreet values and if the user inserts my default value as anything but the first parameter value then it cant be picked up by my selection formula without alot of messing about.

I was hoping to just be able to leave the fields blank so user didnt have to do anything.

I know in 8.5 this is possible just cant recall how i achieved it. I had some paramters which the user could enter to override a certain value such as telephone number when it was extracted from the database. But the user doesnt have to do anything at all with this parameter if they didnt want to override it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top