I have a report that I want to print location names from a location table using a location parameter. The location parameter can have multiple values. I have a loop to print out the location numbers, but I want to print the location name.
If the parameter is based on the location number, then you either have to hardcode the locations in a formula like this:
numbervar i;
numbervar j := ubound({?Location}):
stringvar x :=
for i := 1 to j do (
x := x + (
select {?Location}
case 123 : "London"
case 234 : "Paris"
case 353 : "Moscow"
) + ", ";
left(x,len(x)-2)
Or, if there are too many to hard code, add a subreport, create the same location parameter as in the main report, link the sub to the main report by linking the parameters to each other, and then add the location field to the detail section. You can collect the values in a variable if you want a paragraph style display versus a list display.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.