Search code examples
crystal-reports

How can I display the description value of a query parameter in a crystal report?


If I have defined a query parameter that has a translated value, i.e. the user is prompted with a list of "readable" values and these are converted into the actual value before being used in the SQL query.

Now I want to display the used query parameters in the report header, but I can only figure out how to get the actual, used value (the "translated one") and not the readable one.

Any ideas?


Solution

  • You won't be able to get the 'readable' values from the parameter field, unfortunately.

    If the values (keys and text) are from a table, you could create a subreport, linked to the parameter field, that returns the text values and serializes them. Place the subreport in its own section to allow for expansion; you may also need to experiment w/ section underlays.

    If the values are static, you can create a formula field w/ a CASE statement to convert the key to a friendly value.