SAP Knowledge Base Article - Public

1330960 - Displaying the selected description value of a parameter on a report

Symptom

  • Parameter value selected doesn't display on the report
  • When inserting a parameter on a report, in Crystal Reports, it doesn't display the selected parameter value
  • A parameter that display a description for the value, doesn't display the description when inserted on the report, but displays it's corresponding value.
  • How to display the description for the selected parameter value on a report instead of it's value?

Environment

  • Crystal Reports XI
  • Crystal Reports XI R2
  • Crystal Reports 2008

Reproducing the Issue

  1. In Crystal Reports, create a parameter
  2. Manually enter values and description for the parameter, or create a dynamic parameter with a value and a description
  3. Set the parameter option: Prompt With Description Only, to True
  4. Save the parameter
  5. Insert the parameter on the report
  6. Refresh the report, and when prompted by the parameter, select a value, which is the Description
  7. Notice that on the report it displays the value instead of the description of the corresponding parameter value

For example:

If we create a parameter prompting for country where the country value is numeric code, and the description is the actual country name. In the parameter we will select the Country Number database field for the value, and the Country Description for the Description. So the list will look like:

001   USA

002   Canada

003   Mexico

Now, if we set the parameter to prompt with the description only, when refreshing the report it will display in the drop-down list:

USA

Canada

Mexico

And if we select: Canada, and insert the parameter on the report, it will display the value: 002.

How to display the description: Canada, instead of the country code: 002?

Cause

  • There is unfortunately no option to display the description of the value selected in the parameter
  • An Enhancement Request has been logged under ID ADAPT00698271

The requested feature is to have the ability to display on the report the description value selected in the parameter. Note that enhancement requests are reviewed for future product release and not for the current version. Also, note that it doesn’t guarantee the requested functionality will be added to the product in a future product release.

Resolution

To display the description of the parameter, use one of the following workaround:

  • Create a formula in which you will associate the value with it's corresponding description

Example: If {Country Number} = '001' Then 'USA' Else If {Country Number} = '002' Then 'Canada'

  • Add a subreport with a table that contains the description and the value of the database fields used by the parameter, and link the subreport to the parameter, so the subreport will only return the description of the selected value for the parameter.

Keywords

KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Product Enhancement

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2