[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Display Description of Parameter number values

Posted on 2008-11-06
4
Medium Priority
?
263 Views
Last Modified: 2012-05-05
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!
0
Comment
Question by:cyardley
  • 2
  • 2
4 Comments
 
LVL 18

Expert Comment

by:UnifiedIS
ID: 22899519
Create a formula and use switch
SWITCH (parameter = 0, "Failed", parameter = 1, "Insufficient")

and so on
replace parameter with the proper parameter field.

0
 

Author Comment

by:cyardley
ID: 22903749
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!
0
 
LVL 18

Accepted Solution

by:
UnifiedIS earned 2000 total points
ID: 22904856
Here you go:

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

For i:= 1 to UBound({?pScore}) do
(
If ParamList = '' then
        ParamList := CHOOSE({?pScore}[i] + 1,"Failed", "Insufficient", "Possible", "Minor", "Moderate", "Major")
else
ParamList := ParamList & ", " &  CHOOSE({?pScore}[i] + 1,"Failed", "Insufficient", "Possible", "Minor", "Moderate", "Major");
);
ParamList
0
 

Author Closing Comment

by:cyardley
ID: 31514117
Thank You very much!  That worked perfect.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

868 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