SAP Knowledge Base Article - Public

1559355 - How to use different formulae under Drop down of Parameter prompt in Crystal Reports?

Symptom

How to get different formulae under drop down of Parameter prompt?

Environment

  • Crystal Reports XIR2
  • Crystal Reports 2008

Resolution

  1. Create a String type Parameter (Param).
  2. Add three strings as "Add", "subtract" and "Multiply" under value section of this Parameter.
  3. Create first formula (f1) for addition (example: 8+2).
  4. Create second formula (f2) for subtraction (example: 8-2).
  5. Create third formula (f3) for multiplication (example: 8*2).
  6. Create Fourth formula as follows:

             if {?Param}="add" then {@f1}
             else
             if {?Param}="sub" then {@f2}
             else
             if {?Param}="mul" then {@f3}
             else 0; 

     7. Insert the fourth formula on the report.

     8. Refresh the report.

     9. You will see the Parameter prompt and the three formulae under the Drop down list.

 

Keywords

Formulae, Drop Down, Parameter, Crystal Reports , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

Crystal Reports Server 2008 V1