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

Parameter List 1

Status
Not open for further replies.

OT2

Technical User
Jan 14, 2005
54
US
Hello, hopefully you will be able to help me with the following.

I have report with three parameters: Start Date, End Date and Identifier. The identifier parameter allows multiple values so what I would like to do is include a list at the end of my report that shows all the indentifier I used in my parameter. Is there a quick way to get this done without using SubReports? Thank you, OT2
 
Use join for e.g

"Identifier(s) selected: " + Join ({?Identifier}, ", ")

where ?Identifier is your parameter which accepts the identifiers....
 
Hi jraheja, thanks for your tip, it works great, just one more question, the formula you gave me separates values by commas, is there any way I can list my values, like in a column?

I know this sounds picky, but it would be make my life easier, thanks again
 
Use:

"Identifier(s) selected: " + Join ({?Identifier}, chr(13))

Then be sure to format the formula to "Can Grow."

-LB

 
Yup! Sorry I did not get the email notification. Sometimes it gets blocked. The "can grow" is important else the list will display only to the size of the field..
 
Thank you all for your help. Report looks great.
 
One more question, this there any way I can use the join formula to provide me with additional information. For example I want SecID - SecName. I am using the following formula but is only showing me the SecName for the last entry.

Join ({?primary_sec_id},chr(13)) &" - "& ({mhfsisu.Name})

I would like to see primary_sec_id - mhfsisu.Name for all securities in my parameter.

Thanks again.
 
I haven't tried it but try putting the name along with sec_id and not at the end..

 
One way of doing this, if you don't have too many parameter options, is to hard code the descriptions into a formula like the following:

whileprintingrecords;
stringvar parm;
numbervar j:= ubound({?parm});
numbervar i;

for i:= 1 to j do(
parm := parm + {?parm} + " - " +
(
if {?parm} = "1405" then "Name1" else
if {?parm} = "1406" then "Name2" else
if {?parm} = "1407" then "Name3"
) + chr(13));
left(parm, len(parm)-2;

You would need to format this to "Can Grow". If you have many parameter options, you could also create a subreport that uses the ID and name fields in the detail section, and which is linked to the main report on {?parm}.

-LB
 
I implemented the above code and it gives a missing ')' error...I wasn't sure why...
 
Same here. I played around with the formula for a couple of hours and couldnt get it to work. I think the best way to get this done might be a subreport.
 
You got it? Lets take a look! My hat goes off to you.
 
You have to add a ) at the end of the last statement...
left(parm, len(parm)-2);
 
That's Ok. We cannot expect spoon feeding. You tried to help ASAP. Appreciate it.
 
Thank you all for your help. I have been able to put this report together but unfortunately not using your formulas. I resorted to subreports. I truely thank you for your help and I have learned alot. Thanks- OT2
 
If you want to avoid the subreport, I can send the code lbass gave with my variables....
 
Lets take a look. Thanks jraheja
 
whileprintingrecords;
Here it is -

stringvar parm;
numbervar j:= ubound({?Manufacturer});
numbervar i;

for i:= 1 to j do(
parm := parm + {?Manufacturer} + " - " +
(
if {?Manufacturer} = "HZ" then "Hertz" else
if {?Manufacturer} = "LEX" then "Lexus" else
if {?Manufacturer} = "MZ" then "Mazda"
//) + ", ");
) + CHR(13));
left(parm, len(parm)-2);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top