[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

Use a string parameter containing a comma delimited "array" for record selection

I would like to take a single string value (possibly a list of state abbreviations separated by commas or another delimiter) and use them as part of the record selection (with an "IN" operator or similar). Because the target viewer is limited, I need to allow the users to specificy multiple values in one parameter without using the Crystal multiple select interface.

Thanks in advance.
1 Solution
This will work for you.

Go to Report menu, Selection Formulas, Record.
In the record selection formula, add this:

{table.field} in split({?parameter},",")

The split function will allow Crystal to see the value in the parameter as an array and thus convert it into the appropriate SQL so it gets passed to the database.
jaredfaulknerAuthor Commented:
Smack dab on the money. Thanks for the help.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now