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

Posted on 2006-06-05
Last Modified: 2006-11-18
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.
Question by:jaredfaulkner
    LVL 28

    Accepted 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.

    Author Comment

    Smack dab on the money. Thanks for the help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now