Displaying a parameter's description value

contactmatt picture contactmatt · Aug 23, 2011 · Viewed 15.1k times · Source

In Crystal Reports v 11, is it possible to display the 'Parameter Description' value on the report, as opposed to only the parameter value? Whenever I drag the parameter onto the report to display it, only the value is displayed, and I want to print the description.

Note: I'm working in Crystal 11 (XI), not the .NET Crystal Report plug-in.

Answer

craig picture craig · Aug 23, 2011

I agree with Ryan--there isn't a native mechanism to grab these values. A user-function library (UFL) might be an approach worth investigating.

In lieu of that, I handle this a number of ways:

  1. a formula with a case statement to convert the value to a description.
  2. a custom function that does the same a #1; custom functions can be shared w/ other reports via the BOE repository
  3. use a subreport to query a table that can covert the value to a description. store the values in an array in the Detail section (suppressed), then Join() the array in the report footer. if you embed the subreport in its own section, it will expand as needed to accommodate an expansive list
  4. you might be able to adapt #3 to use a list of values exposed by BO's query as a web service (QAAWS), but I haven't experimented with this. If it doesn't have an associated schema document, CR won't be able to use the XML webservice as a data source.