Link to home
Start Free TrialLog in
Avatar of cyardley
cyardley

asked on

Display Description of Parameter number values

Hello,

I have a parameter that contains scores 0 to 5.  What I want to do is create a title in the page header that shows the user the Description of the values that they have selected for the report.  I am using the following formula (greatly provided by the expert mlmcc) to capture the values:
Loacl StringVar ParamList := '';
Local NumberVar i;

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

However, I would like to display them on the report with their description instead of the number values.  Is there a way to do this?

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

Thank You!
Avatar of UnifiedIS
UnifiedIS

Create a formula and use switch
SWITCH (parameter = 0, "Failed", parameter = 1, "Insufficient")

and so on
replace parameter with the proper parameter field.

Avatar of cyardley

ASKER

UnifiedIS,

Thank you for the reply.  The switch formula does work but not if I select multiple values to report on.  It only shows one value.  The parameter is a multiple value parameter so users might select the score of 3 and 5, for example.  Is there a formula that will show all value names that are selected?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of UnifiedIS
UnifiedIS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank You very much!  That worked perfect.