WhilePrintingRecords;
StringVar ExtText;
StringVar array lines := Split(ExtText, "~;~");
StringVar Desc := lines[1];
StringVar Exempt := "";
StringVar CoO := "";
StringVar MoP := "";
StringVar Misc := "";
NumberVar i;
For z := 1 to Ubound(lines) Do (
If Instr(UpperCase(lines[z]), "EXEMPT") > 0 Then Exempt := lines[z]
Else If Instr(UpperCase(lines[z]), "PRODUCT OF") > 0 Then CoO := Trim(Mid(lines[z], 11))
Else If Instr(UpperCase(lines[z]), "WILD") > 0 Then MoP := lines[z]
Else If Instr(UpperCase(lines[z]), "FARM") > 0 Then MoP := lines[z]
Else Misc := Misc & lines[z];
);
Recently updated from Crystal 8.5 to 10 and this used to work fine then. Now I'm getting: "A subscript must be between 1 and the size of the array." and lines[1] (next to desc in the declarations) is highlighted (I assume this means it is the offending code)
Using an ODBC Connection to a MAS200 database.
disclaimer : arrays (in Crystal) confuse the heck outta me and I'm relatively new to Crystal Reports. Most of them were created by the previous admin and I'm just trying to keep them going.
Edited by Nauip - 18 Feb 2008 at 12:06pm