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!

Formula Parameter Array Subscript 2

Status
Not open for further replies.

omoralez

Programmer
May 1, 2006
23
US
I need to display the parm values user selected in the Heading of a report. Using Crystal 11.5 I have parameter option for multiple values, so 1 to 4 possiblities. I need to convert the numberic value parm to alpha value equalivant in the header. I receive formula error: This array must be subscripted. For example: Array

I am not sure how the parameter handles the array of values when any combination of 1 to 4 could be selected.

Parm export:
%%%%ShowDescOnly 0
1 Other
2 Aggression
3 Medical
4 Theft/Vandalism
 
You can use a formula like this:

whileprintingrecords;
numbervar i;
numbervar j := ubound({?Parm});
stringvar x;
for i := 1 to j do (
x := x + (
select {?Parm}
case 1 : "Other"
case 2 : "Aggression"
case 3 : "Medical"
case 4 : "Theft/Vandalism"
) + ", "
);
left(x,len(x)-2)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top