Print Page | Close Window

Display multiple parameter values in report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9672
Printed Date: 03 May 2024 at 5:49am


Topic: Display multiple parameter values in report
Posted By: brain
Subject: Display multiple parameter values in report
Date Posted: 13 Apr 2010 at 6:48am

Crystal X.

How do I display multiple parameter values on the report? When I drag the parameter field to the report, it shows only the first of the user-selected values.



Replies:
Posted By: DBlank
Date Posted: 13 Apr 2010 at 7:15am
join({?parameter},',')


Posted By: brain
Date Posted: 13 Apr 2010 at 7:28am
Perfect! Thank you.


Posted By: Laguna
Date Posted: 20 Sep 2012 at 7:09am
Hello DBlank!
Where do you put this command at?
join({?parameter},',')

I have the same question about displaying parameters in a report for the report i'm working on and I luckily found this posting.
 
Thanks for your help!


Posted By: DBlank
Date Posted: 20 Sep 2012 at 7:35am

In the field explorer

create a new formula field (right click and select new)
 
drag the formula field onto the report canvas


Posted By: Laguna
Date Posted: 20 Sep 2012 at 7:44am
Excellent! Thank you so much!!


Posted By: aeromonte
Date Posted: 31 Jul 2013 at 5:02am
Just came across this. This works for strings, but what about numbers? It doesn't seem to work for a multiple number parameter (example: fiscal period 1, 2, 3)


Posted By: aeromonte
Date Posted: 31 Jul 2013 at 6:14am
OK, found this formula that works for multiple numeric parameters - for anyone who needs this in the future:

WhilePrintingRecords;Local NumberVar Array InputNum := {?YourParameter};

Local StringVar str := "";Local NumberVar strLen := Count (InputNum);Local NumberVar i;        For i := 1 to strLen        Step + 1        Do (str := str +', '+ ToText(InputNum ,0,''));
str [3 to Length(str)]



Print Page | Close Window