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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

showing mulitiple parameter criteria on my report

Status
Not open for further replies.

Kim296

MIS
Aug 24, 2012
98
US
Good Morning,

I have a report with several parameters that prompt on opening, some of which are range values. I'm trying to list the parameter criteria at the top of my report, but the range values are blank.

I've tried the following in the formula field:

JOIN({?parameter},',')

but it will not work. It says that "A String array is required here."

How can I make this work, so that the enduser can view the criteria needed (once the prompt is gone).
 
Join() only works for striong paramters, for the others you will need a formula like this for each parameter

whileprintingrecords;

shared numbervar counter;
shared stringvar display;

for counter := 1 to count({?Parameter }) do
(
display := display + totext({?Parameter }[counter],0,"") + ", ";
);

display;

Ian
 
PS
Variable does not have to be shared, local or global will be OK

Ian
 
Thanks for your response Ian. I've used the following like you suggested, but it keeps giving me errors. The first error says that I need a ")" behind the last "display;". I changed that, then it said I have an error for ({?AGE})- "A field is required here." If I change that to a field then it starts giving me one error after another. I'm not very good at codes. Can you please see if there's something missing or tell me where I can look to learn more about this type of operation. Thank you.


whileprintingrecords;

shared numbervar counter;
shared stringvar display;

for counter := 1 to count({?AGE}) DO

( display:= display + TOTEXT ({?AGE}[counter],0,"") + ",";

display;
 
Might be me as I could not test; try removing ; in this line

display := display + totext({?Parameter }[counter],0,"") + ", ";

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top