where to do manual calculations
i have two db fields (doorct and drawerct).
i manually add these two fields together to get a totalct for each detail
line.
also adding this totalct to a accumct to get a running total.
these calculations are being done on "before print" for the detail line.
i tried on the "before generate".
The problem is calculations continue to kick off when viewing the report on
the
viewer. I can traverse the report but when i start backing up thru the
pages, the totals
do not retain the original values, instead they keep going up.
and if i don't preview the other pages, and click the printer icon to print,
the totals for the first record
reflect the additions done after the second page on the first record of that
page.
WHERE SHOULD THESE CALCULATIONS BE DONE?
TIA.
i manually add these two fields together to get a totalct for each detail
line.
also adding this totalct to a accumct to get a running total.
these calculations are being done on "before print" for the detail line.
i tried on the "before generate".
The problem is calculations continue to kick off when viewing the report on
the
viewer. I can traverse the report but when i start backing up thru the
pages, the totals
do not retain the original values, instead they keep going up.
and if i don't preview the other pages, and click the printer icon to print,
the totals for the first record
reflect the additions done after the second page on the first record of that
page.
WHERE SHOULD THESE CALCULATIONS BE DONE?
TIA.
This discussion has been closed.
Comments
THE REPORT ENGINE KEEPS TRAVERSING THRU THE RECORDS.
I CAN GO BACK AND FORTH BETWEEN PAGE 1 AND 2 AND THE TOTALS
KEEP GETTING BIGGER AND BIGGER AND BIGGER AND BIGGER.
TIA.
Try setting Report.CachePages to True. Other wise you will have to keep
track of which page you are on so you do not recalculate the your values.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
That was the answer.
Just about pulled my hair out on this( don't have much to pull).
LOL
THANKS AGIAN.
when it prints from the viewer, the total picks up
at some place and gives bad totals.
Usually when the output in the preview differs from the the output of the
printer, there is some event code or data processing that is confusing the
report engine during report generation. As a test, try commenting out all
your event handler code (especially the code where you might be accessing or
modifying your dataset) and see if that makes a difference. If so, then
periodically begin adding the code back to isolate the problem.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com