Crystal 8.5
Oracle 9i
I am need to create a unique string for each unique shipping pattern. For example shipping to Miami then Daytona then Atlanta will create MiamiDaytonaAtlanta and the order matters.
/////////DETAIL SECTION\\\\\\\\\whileprintingrecords;
global stringvar holdshipnum;
global numbervar citylength;
global stringvar citycompare;
// get the length of the city name
citylength := length ({SHIPHEAD.SHIPCITY});
// get # of characters from the right of holdshipnum that is equal to the citylength from above
citycompare := Right(holdshipnum, citylength);
// If last city shipped to is the same as the current city shipping to, do nothing.
// Else append a new city to holdshipnum string. This is because a load could have multiple stops in the same city.
if citycompare like {SHIPHEAD.SHIPCITY}
then holdshipnum := holdshipnum
else
holdshipnum := holdshipnum + trim({SHIPHEAD.SHIPCITY})
////////////GROUP FOOTER SECTION\\\\\\\\\\\\\global stringvar holdnum;
global stringvar array shipnumarray;
global numbervar loadcount;
loadcount := loadcount + 1;
shipnumarray[loadcount] := holdnum
Need this array to hold the unique string that was created in the detail section for the load for comparison later, with each increment of the loadcount variable.
However I am getting the following error:
"A subscript must be between 1 and the size of the array" on the line "global stringvar holdnum"
Any help is appreciated.
Oracle 9i
I am need to create a unique string for each unique shipping pattern. For example shipping to Miami then Daytona then Atlanta will create MiamiDaytonaAtlanta and the order matters.
/////////DETAIL SECTION\\\\\\\\\whileprintingrecords;
global stringvar holdshipnum;
global numbervar citylength;
global stringvar citycompare;
// get the length of the city name
citylength := length ({SHIPHEAD.SHIPCITY});
// get # of characters from the right of holdshipnum that is equal to the citylength from above
citycompare := Right(holdshipnum, citylength);
// If last city shipped to is the same as the current city shipping to, do nothing.
// Else append a new city to holdshipnum string. This is because a load could have multiple stops in the same city.
if citycompare like {SHIPHEAD.SHIPCITY}
then holdshipnum := holdshipnum
else
holdshipnum := holdshipnum + trim({SHIPHEAD.SHIPCITY})
////////////GROUP FOOTER SECTION\\\\\\\\\\\\\global stringvar holdnum;
global stringvar array shipnumarray;
global numbervar loadcount;
loadcount := loadcount + 1;
shipnumarray[loadcount] := holdnum
Need this array to hold the unique string that was created in the detail section for the load for comparison later, with each increment of the loadcount variable.
However I am getting the following error:
"A subscript must be between 1 and the size of the array" on the line "global stringvar holdnum"
Any help is appreciated.