Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERRORS IN SUBREPORTS 1

Status
Not open for further replies.

geomcc1

MIS
Jun 21, 2005
9
CA
HI, I'M GETTING ERRORS IN A SUBREPORT. I ADAPTED THE REPORT FROM LAST YEAR AND MADE NEW ALIAS AND LOCATIONS. THE REPORT RAN ON A TEST OF 6 ACCOUNTS AND WORKED. iT THEN WAS TRIED ON 100 AND FAILED. The error is "A subscript must be between 1 and the size of the array." It is on Subscript "@seat from" which splits order detail into individual items. Any idea how I can finesse this?

Thanks George
 
Sorry, it is on Crystal Reports V9 and Win XP reporting from a DB2 database using ODBC. I should have mentioned this.
George
 
You need to share the contents of the formula that uses the subscripts.

-LB
 
Split ({TK_ODET_HK0506_SEATS_ASS0C.U_SEAT},"," )[2]
THIS IS THE BASIC FORMULA THAT IS GIVING THE ERROR. THIS SUBREPORT IS THEN USED IN @COUNT. SEE BELOW
if tonumber({@seat to}) >=tonumber({@seat from})
then tonumber({@seat to}) - tonumber({@seat from}) + 1
else if tonumber({@seat from}) > tonumber({@seat to})
then tonumber({@seat from}) - tonumber({@seat to}) + 1
else 0

tHANKS GEORGE
 
Replace your {@seat from} formula with:

if ubound(split({TK_ODET_HK0506_SEATS_ASS0C.U_SEAT},","})) > 1 then
Split ({TK_ODET_HK0506_SEATS_ASS0C.U_SEAT},"," )[2] else
{TK_ODET_HK0506_SEATS_ASS0C.U_SEAT}

-LB
 
Thanks for the help. I was under the gun for time. I still haven't found out why the DB-2 tables have changed. I will post when I have more info. The 3rd party we contract to for Data just sent us a script which works , but no longer references .U_seat. It has an ODET_season_SEATS_ASSOC, but now they reference .Z_SEAT? No explanation either.
Works, but why the change?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top