In Crystal reports, created a parameter to get multiple values to function as an array. I found I cannot enter same value twice. User needs to enter quantity for each box received. If box1=5, box2=3, box3=7, then no problem. If box1=3, box2=5, and box3=3… I cannot enter the value for Box. Thus, I created 3 parameters (actually I want 12) and I want to load them into an array as follows:
//create an array of box quantities
NumberVar Array BoxQtys
Redim BoxQtys[Ubound({?Box Count})];
//populate array
Numbervar i;
for i := 1 to Ubound(BoxQtys) do (
BoxQtys[i] := {?Box 1 Qty}
);
My problem is how to set the parameter as a series of parsed strings where BoxQtys[i] = “{Box ” & i & Qty}”. Is there a way to do what I want or do I have to go the long route of defining each element in the array without a loop?
Thanks
Tony
Please see above. I was going to use SPLIT() with ; delimiter, but users would then have to enter a string of numbers with semi-colons. There are a lot of ways that could go wrong. Having 12 number fields ensures correct entry.
TonyS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.