Error in month crystal report?

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.
Hunt HolmesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

mlmcc
Hunt HolmesAuthor Commented:
The data is pass in numeric 1,2,3 and i want to view it as Jan, Feb, Mar
Mike McCrackenCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.