Formula to display what multiple parameters were selected after a report is run

Hello Experts,

I have a multiple value parameter that allows users to select any score ranging from 0 to 5 so that they can see mixed results.  For example, a user can select to see records with a score of 3 and a score of 4.  

What I want to do is create a title in the page header that shows the user the values that they have selected for the report.  When I drag the parameter into the page header it only displays the first value selected not all values.  Is there a way to show all values selected after my report is run?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
You can use the Join function within a formula field.  For example Join({?Parameter},", ").  In this case, I've created a delimiter of a comma and space following each value returned.
cyardleyAuthor Commented:
Thanks for the reply.

I think I'm misunderstanding exactly what to do.  I put that example above into the following formula:

When I do that I receive the error, "A String Array is required here"

I apologize.  I am at a beginner level to Crystal so I may be misunderstanding you.

Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
In your case, {pScore} isn't a parameter field.  Parameter fields have ? in front of them.  Since you want to display the actual parameters the users selected, you need to include that in your formula.  If your parameter doesn't allow multiple values, then you'll get an error message.  Assuming the parameter does and that you've used the correct field and syntax correctly, all should go well.
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

cyardleyAuthor Commented:
I apologize.  In the formula that I wrote above I missed putting the ? in front of the parameter.  This is a copy of the formula directly from the report:
My parameter is set to allow multiple values and my report is returning the records.  However, I must be using the syntax that you've sent incorrectly because I still receive the "String Array is required here" error.
I assume the parameter is using numeric values.

You probably need to do it this way

Loacl StringVar ParamList := '';
Local NumberVar i;

For i := 1 to UBoud({?pScore}) do
    If ParamList = '' then
        ParamList := CStr({?pScore[i]},0)
        ParamList := ParamList & ', ' & CStr({?pScore[i]},0)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cyardleyAuthor Commented:

Thank you.  That formula returns the values that I am looking for.  Each value is assigned a classification as well.  For Example if the score is 0, the Classification is "Failed".  Is there a way that after the formula that you have above runs I can dispaly the classification on the report as well?

My score value and classifications are:
0 = Failed
1 = Insufficient
2 = Possible
3 = Minor
4 = Moderate
5 = Major

Your formula did answer my original question.  So if necessary I can close this thread and award the points then open a new question.

cyardleyAuthor Commented:
I've decided to close this thread since mlmcc's response does answer my original question.  I will open a new thread regarding the new question.


If they won't change so you have to maintain this code then something like this.  If they will change then I would recommend adding a table to the database and linking it or using and SQL expressiion.

If {Score} = 0 then
else if {Score} = 1 then

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.