Error in month crystal report?

Hunt Holmes
Hunt Holmes used Ask the Experts™
on
Stringvar Array strings := Split({?@V2_month},",");
Stringvar result := "" ;
Numbervar i;
for i := 1 to Ubound(strings) 
do (
 result := result + MonthName(ToNumber(strings[i]) , true)+", " ;

);
MID(result , 1 , len(result) - 2);

Open in new window


The error show number must be between 1 and 12.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
WHat data is being entered for ?@V2_month?
Either a non-numeric or a value outside that range.

mlmcc

Author

Commented:
The data is pass in numeric 1,2,3 and i want to view it as Jan, Feb, Mar
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
You formula works for my test when I created a parameter and passed 1,2,3 in.

Are you sure the value is entered as shown.  I tried 1,2,34 and got your error

I tried 1,2,3 4 and got a non-numeric string error.

WHy not use a numeric parameter and pass in multiple values. They will already be in an array.

mlmcc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial