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!

Displaying discrete, multiple parm values in report header 1

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Hello All,

Someone posted a question in another thread about displaying a range of input parms in the report. The example give was similar to the following:

"Dates are: " + totext(minimum({?DateParm}))+" thru "+ totext(maximum({?DateParm}))

How do you display the parms if the parm allows discrete, multiple values (eg AcctNumber 14031, 14369, 15207)? The report SQL converts them all into an or clause. Thanks for any ideas and/or suggestions!



Have a great day!

j2consulting@yahoo.com
 

The multiple discreet value parameters are just simple arrays. To display it depends on the type, if strings you can use Join({?parameter},", ") to show them comma deliminated. If they are other data types you will need to loop through them and convert to text to display them.

Lisa
 
Thanks lyanch! I have looked in help many times trying to find that piece of information. For the benefit of others, here is some code that converts multiple, numeric parm values into a comma delimited string.

Define a formula variable as follows:

BeforeReadingRecords;
Local NumberVar Index;
Local StringVar Result;
Local NumberVar Array NumArray := {?AccountNumber};
UBound(NumArray);
For Index := 1 To UBound(NumArray) Do
(
Result := Result + ToText(Int({?AccountNumber}[index])) + ", "
);
Result

Thanks again for the tip!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top