Skip to Content
author's profile photo Former Member
Former Member

Multiple Default values - Crystal Report

Hi,

is there a way to set multiple values as the default value in a crystal reports paramter?

If I enter multiple values separated by a semicolon displays it as one value.


Cheers

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 30, 2013 at 10:17 AM

    Hi Leo,

    You can only set one value as default. If you type in a comma separated string in the 'Default Values', then it is treated as a single value.

    What you can, however do is create a record selection formula that runs different checks before showing the data. Like this

    Note: This is assuming the prompt itself is set to allow multiple values.

    stringvar array arr;

    if ubound({?Prompt}) = 1 then

    (

    if instr({?Prompt}[1],",") > 0 then

    (

    arr := split({?Prompt}[1],",");

    {database_field} IN arr;

    )

    else

    {database_field} = {?Prompt}

    )

    else

    {database_field} IN {?Prompt}

    Hope this helps!

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.