Print Page | Close Window

Passing multiple or range param problem

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17679
Printed Date: 27 Apr 2024 at 4:09am


Topic: Passing multiple or range param problem
Posted By: wanamingo
Subject: Passing multiple or range param problem
Date Posted: 03 Oct 2012 at 7:21am
So ive created a report that prints out some serial numbers based on a work order. Its simplifying one of the processes where I work.

 The report does what it is supposed to do but there has been a request to enter some serial numbers manually, in case they need duplicates or in some cases serial numbers aren't attached to a work order.

I cant seem to be able to pass either a range or multiple value parameter based on manual entry, the entries are just blank. Ive posted a similar problem here before and was told it had to do with no database being attached to the manual entry field.

Anyone have any suggestions?



Replies:
Posted By: Sastry
Date Posted: 03 Oct 2012 at 7:01pm
Hi
 
If we pass multipul values through parameter then it creates an array and if you place the paramter in your report it will show the first value only. To display all values try to with the following :
 
Join({?parameter},',')
 
It will join all your values by separating with comma.  If you want to place the first value of your parameter then you need to use split() function.
 
Ex :
 
split(join({?parameter{,','),',')[1]
 
Play around with this functions


-------------
Thanks,
Sastry


Posted By: wanamingo
Date Posted: 04 Oct 2012 at 8:17am
Thanks for the response! Ive tried playing around with the Join function but unfortunately when applied to my parameter crystal says "A string Array is Required here" and points to my parameter. I know its a string value, and a range / multiple value parameter.

Any other suggestions?
 


Posted By: Sastry
Date Posted: 04 Oct 2012 at 7:01pm
HI
 
If you don't give any value or if you give only one value to your parameter then it will give you such kind of errors.
 
Try the following :
 
If count({?Parameter}) > 1 then
Join()
else
{?Parameter}


-------------
Thanks,
Sastry


Posted By: wanamingo
Date Posted: 11 Oct 2012 at 8:27am
Thanks again for the reply unfortunately I am still having issues. I never expected to get stuck with this part of the report.

Playing around with the formula you gave me I am getting an error of "The field cannot be summarized" of the first instance of the parameter.

I dont see why crystal would make it so difficult to enter in simple numeric ranges not based on a field.

Thank you again for the timely reply. Any other suggestions?





Print Page | Close Window