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

Crystal Reports 11: Parameter Fields

I need to create a parameter field that essentially asks for the user running the report to choose a Name Group.

Name Group = Customer name starting with A - H, I - P, and Q - Z

I them to be able to select those as options and it give me the customers that start with names within that group.

Any suggestions?

Thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 13, 2012 at 11:42 PM

    Hi Angela,

    Here's how can do it:

    I'm did not create a named group, instead created a formula that puts the names in the correct groups according to what you select. Then we just create a group selection formula to rid of the others.

    1) Create a static parameter with values "A-H", "I-P" and "Q-Z"

    2) Create a formula like this:

    if {?My Parameter} = "A-H" then
    (
        if (left({Customer.Customer Name},1) in "A" to "H") then "A-H"
    )
    else
    if {?My Parameter} = "I-P" then
    (
        if (left({Customer.Customer Name},1) in "I" to "P") then "I-P"
    )
    else
    if {?My Parameter} = "Q-Z" then
    (
        if (left({Customer.Customer Name},1) in "I" to "P") then "Q-Z"
    )

    3) Create a group on this formula

    4) Go to Report > Selection Formula > Group and use this formula:

    {?My Parameter} = GroupName({@formula_name})

    Let me know how this goes!

    -Abhilash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2012 at 09:44 PM

    Worked like a champ! Thanks so much!

    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.