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

passing multiple values in parameter

Status
Not open for further replies.

asociate

Programmer
Apr 14, 2002
17
0
0
IN
hi,

iam passing multiple values through parameter.
the value contains : customer code + customer name

eg: DSP0003-ABCDEF LIMITED

User selects the above code to view details. In the 'select expert' I trim the above code for taking the first 7 characters
like:{sl0321.cust} = left({?Cust code},7)
and perform a search on it. Report retrieves the data based on these 7 characters. I see the following error:

"This array must be subscripted.For example:Array."

Can anybody suggest me how to solve this problem.

thanks.
kumar
 
Do you allow the user to select more than one parameter value when promting for a parameter ?
 
yes,the user is allowed to select more than one parameter
 
try maybe the following
create a formula and use the beforereadingrecords statement;
trim your code
then move the parameters into a array.
use the formula then in the selection expert

if that does not work try concaternating the values together that you get something like this.
["DSP0003","DSP0004"]
and then use the formula with a in statement in the selection expert.

I hope these suggetions are of some help.
This is what i would try and do.
 
Multiple value parameter fields are treated as arrays by crystal. However, you need to create an another array in this case - specifically one that only contains the first 7 characters of the parameter array elements. Then compare it to the customer field

However, it would be much easier to change your parameter field to include only the customer numbers, and use the name as the parameter description. If you do thjis you have a very simple record selection formula:

{sl0321.cust} in {?Cust code}

Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top