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 descriptions 3

Status
Not open for further replies.

swhitten

Technical User
Sep 3, 2002
191
US
I have a parameter that allows multiple choices. The parameter values have a Value and a Description. I want to display the Descriptions that the user selects in the parameter.

To display the values, I would do:

join({?parameter},', ')

But I don't know what formula to use to display the description rather than the parameter value.

Ideas?
 
You either have to hard code the options into a formula that loops through the values or you can insert a subreport that is linked to the main report on the parameter and in which you add the table that includes the description field. The method you use depends upon the number of possible values.

-LB
 
this particular paramter is a very short list, so can you help me with the formula? I know how to write an if-then or case that says something like if it's "N" then return "New" if it's "U" then return "Used". But I don't know how to get all of that into my list of selected values, since the user may select both new and use, and I need to display all selected values. I hope that makes sense.
 
oh ignore that, i think you have to use an loop with array
 
numbervar i;
numbervar j := ubound({?parm};
stringvar x;
for i := 1 to j do(
x := x + (
select {?parm}
case "abc" : "Desc1"
case "def" : "Desc2"
) + ", "
);
if len(x) > 2 then
left(x,len(x)-2)

-LB
 
LB,

Thanks a million! I need to dissect your code and sort it out in my accountant (not programmer) brain, but it works great!!!!!

Sherry
 
I had another parameter that has just one value (not multiple choices). The list of possible values is huge, so I used a sub-report for it, linking it on the parameter in the main report. That worked great too! Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top