PAULCALLAGHAN
Technical User
Can someone please help me trouble-shoot an error message I keep getting?
I'm using Crystal Reports version 8.5.
The user is entering two pieces of data in a text field, in the format data1/data2. We have no other empty field available to avoid this.
For data1 I have the formula,
StringVar data1:= Split({field},"/")[1];
For data2 I have the formula,
ToNumber(LTrim(Split({field}, "/")[2]));
I want data1 to appear throughout my report but I only want a grand total for data2. Thats why I'm trying to treat it as a number.
Everytime I run the report I get the error message,
"A subscript must be between 1 and the size of the array." This appears when trying to calculate the formula for data2.
What am I doing wrong? Please explain.
I'm using Crystal Reports version 8.5.
The user is entering two pieces of data in a text field, in the format data1/data2. We have no other empty field available to avoid this.
For data1 I have the formula,
StringVar data1:= Split({field},"/")[1];
For data2 I have the formula,
ToNumber(LTrim(Split({field}, "/")[2]));
I want data1 to appear throughout my report but I only want a grand total for data2. Thats why I'm trying to treat it as a number.
Everytime I run the report I get the error message,
"A subscript must be between 1 and the size of the array." This appears when trying to calculate the formula for data2.
What am I doing wrong? Please explain.