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

Passing Comma Separated Values in Parameter

Status
Not open for further replies.

hgraybill

MIS
Mar 30, 2007
32
US
I've searched for the answer to this, but to no avail.

I have a parameter on a report that is setup to accept multiple discrete values. For multiple values, the user has to enter each one and then hit the add button. Is there a way for them to copy a comma separated list into the parameter box and then hit add? The list would be like Value1, Value2, Value3, etc.

I know how to do this in VB, but I'm not sure if Crystal will allow this with some programming.

Thank you!
 
Hi,
Have the parameter set to a single value type --

In your record selection formula use that comma-separated string in an IN statement, like:

{sometable.somefield} IN ({?Paramener})..

Most databases will not care if the values are not quoted ( 'value') but if needed, have it in the pasted list.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
That works perfectly. I didn't need the quotes in Crystal.

Thank you very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top