cancel
Showing results for 
Search instead for 
Did you mean: 

A subscript must be between 1 and the size of the arry

0 Kudos

Hi,

I am getting an error while extracting the report to excel sheet from crystal report at this formula,

cstr(Tonumber(split({Command.fwd_input},"/",6)[2]),6)

The error message is A subscript must be between 1 and size of the array

any idea what is wrong in this formula please.

Accepted Solutions (0)

Answers (2)

Answers (2)

venkateswaran_k
Active Contributor
0 Kudos

The array index of your statement split({Command.fwd_input},"/",6)[2] is coming as 0 - due to non existence of the split char "/".

If it is a user entered input from command prompt, string the "/" if it does not exisit.

Regards,

Venkat

ido_millet
Active Contributor
0 Kudos

The error is due to cases where {Command.fwd_input} doesn't contain a "/"

So add logic to handle those cases.