Jay,
In these circumstances (since I don't like to use public variables either) I just create a temporary cursor for the report totals.
create cursor c_reportotals (totalcodes N(10,2))
** run some SQL
insert into c_report (totalcodes) values (_TALLY)
Brandon Harker
Sebae Data Solutions