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

Displaying all parameter entries

Status
Not open for further replies.

rier

Technical User
Sep 13, 2000
27
GB
Can anyone help?

If I create a range parameter and I want 'my selections' to appear as a list on the report, how would I go about this?

i.e, I select 'Jan, Feb, April' from my parameter selector, on the report I would then like to see the 3 selected


Thanks

Richard
 
Join({?MVparameterfield}),", ")

That will concatenate all values of the MV parameter field with a comma and space after all of them except for the last.

Join() is not valid prior to CR V8.

If using 7 or earlier I would use a formula:

If count({?MVparm}) = 1 then {?MVParm} else
If count({?MVparm}) = 2 then {?MVParm}[1]+" "+{?MVParm}[2]else....

continue this logic until you have reached the maximum number of values you could reasonably expect for the
{?MVparm} field.



Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
dgillz

Thanks very much for your help - works lovely


Richard
 
Join only works if the parameter is a string.

For dates or numbers use
stringvar s;
numbervar i;
for i:=1 to count({?date or number}) do (
s:=s + ", " + totext({?date or number} );
mid(s,3) // to remove leading comma and space

We've also published a version of this that supports multi value ranges.
Editor and Publisher of Crystal Clear
 
join will not work if the totallength of the parameter is > 254 - any ideas?

PS I have tried using the formulas contained in c2006429 and this does not work either. It does not display anything at all!!
 
I would try chelseatech's loop method Software Support for Macola, Crystal Reports and Goldmine
 
Loop method sounds good to me...but only additon would be a test on the length of the string to kick it out when it nears 254 characters....you could follow it up with another Loop to pick up where the other left off creating a second string(initialized to null so it won't show if not used)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top