Hi List -
I have a report that accumulates Report Footer totals of several variables in an On After Generate in the breakpoint band (there's only one breakpoint in this report). There are DBCalcs in the Report Footer that sum DB columns, but variables are summed in the breakpoint: (vVarTot =.vVarTot + .vVar).
The report is run from a pushbutton with the code:
PRINT IFTACharge WHERE &vWheClause OPTION SCREEN +
 |LEFT 20 +
 |TOP 20 +
 |WIDTH 900 +
 |HEIGHT 1020

The issue: if the report is only one page, the totals are correct. In a multipage report, however, each time I go to the last page, the variable Report Footer totals are arithmetically increased by the amount of vVarTot. e.g. if vVarTot is $424.08, it becomes $848.16, then $1,272.24, etc. This is within the preview of the report, not exiting and rerunning it. This also happens on a single page report if the report is sent to a non-existent printer.
The DBcalcs function properly.

I (think I) know it's because the variable totals aren't being cleared, but I can't figure out how while staying in the preview mode. The larger questions is why are they compounding? I thought once a report was generated for preview, the static results were displayed. But the report appears to be recalculating on next/prev page and when sent to a printer. The printed report is correct - most of the time; client says sometimes not, but I haven't taken the time to confirm. I figure once I get the problem resolved in preview, the printed report will be OK.

More Info:
I tried calculating one of the variables in a variable expression evaluated on Footer 0 but got the same result.
RBWin 7.6.10.31116

I think I'm not seeing a very simple D'Oh!

TIA,
Doug


Reply via email to