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

Show parm values for number type with multi select

Status
Not open for further replies.

MColeman

Programmer
Sep 23, 2002
242
0
0
Parameters that have multiple values can be displayed in the header with:

Join({?mystringparameter}, ', ')

The result would print like value1, value2, value3, etc.

I tried this on a number parameter and got an error message that said a string was required.

Below is a solution I worked out. Do any of you know of a better or cleaner way of doing this?

local stringvar myparameterlist := "";
local numbervar ndx := 0;
local numbervar maxndx := UBound({?mynumberparameter});
for ndx := 1 to maxndx do
(
if ndx = maxndx then
myparameterlist := myparameterlist +
totext(({?mynumberparameter}[ndx]))
else
myparameterlist := myparameterlist +
totext(({?mynumberparameter}[ndx])) + ", "
);
myparameterlist



 
Hi,
did you try:

Join(totext({yournumbervar}),',')


[profile]

 
We use three parameters here. The last one typically accepts dates or proxy information. In order to make manipulating this data easier we separate the values with "@#." That way we can use the split command to break up the values.

So, for example, we might be passing a four digit number as a manager ID such as 7000. If we are using a hierarchical technique to limit the date we might have '7000@#6000@#' where the first four digit number is the director and the second one of his/her managers. Then we might also pass a date range with the input looking like this;

'7000@#6000@#02/01/2005@#03/30/2005@#'

Then when it's time to parse the information we use;

Code:
\\Initialize
WhilePrintingRecords;
StringVar Director := split({?parameter}, '@#')[1]
StringVar Manager := split({?parameter}, '@#')[2]
DateVar StartD := date(split({?parameter}, '@#')[3])
DateVar EndD := date(split({?parameter}, '@#')[4]);

I'm not saying this is the best way, but the '@#' provides a unique means of delimiting the data. To date we've had no problems using this technique. The above formula would typically go in the report header or group header depending on use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top