Display Description of Parameter number values

Posted on 2008-11-06
Last Modified: 2012-05-05

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)
        ParamList := ParamList & ', ' & CStr({?pScore[i]},0)

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!
Question by:cyardley
    LVL 18

    Expert Comment

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

    and so on
    replace parameter with the proper parameter field.


    Author Comment


    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?

    LVL 18

    Accepted Solution

    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")
    ParamList := ParamList & ", " &  CHOOSE({?pScore}[i] + 1,"Failed", "Insufficient", "Possible", "Minor", "Moderate", "Major");

    Author Closing Comment

    Thank You very much!  That worked perfect.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    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 …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    733 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

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now