Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Parameter Description, not Value

Status
Not open for further replies.

rdeleon

IS-IT--Management
Jun 11, 2002
114
US
The search feature has been down, so I hope this question has not been asked too many times.

I need to display the parameter description. Can this be done?

I am using 8.5 with an SQL Server stored procedure.

Thanks,

Rene'
 
One approach is to hard code the description as in the following formula based on fields in the Xtreme database:

stringvar parmdesc := "";
numbervar counter := 0;
numbervar i := count({?prod ID});

for counter := 1 to i do(

parmdesc := parmdesc + (if {?prod ID}[counter] in 2201 to 2202 then "Triumph Pro Helmet" else
if {?prod ID}[counter] = 3301 then "Guardian Chain Lock" else
"")+ ", ");
left(parmdesc, len(parmdesc)-2);

-LB
 
In addition to LB's suggestion, here a couple more options:

1) Since you're using a stored procedure, you could return it with your result set.

2) Create a formula on the report that displays a description based on the selected parameter:
[tt]
// @DisplayPrmDescription
select {?YourParameter}
case "A" : "A Description"
case "B" : "B Description"
case "C" : "C Description"
default: "No Description"
[/tt]
Option 2 could get messy and a pain to maintain if you have a lot of parameter options, or they change often.

-dave
 
The short answer is no.

This assumes that you mean that you want to display the description of the parameter at parameter collection time within Crystal.

Consider converting the SP to a View and then this is much simpler as you can just import or hand edit the descriptions and only display the descriptions if you so desire.

Keep in mind that Crystal is brain dead when it comes to parms as it does not automatically update a picklist when new values are added to the underlying table(s).

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top