Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

where to do manual calculations

edited March 2004 in General
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.

Comments

  • edited March 2004
    LSO TRIED ON CALC.

    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.
  • edited March 2004
    Mojoala,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Thank you very much Nico.

    That was the answer.

    Just about pulled my hair out on this( don't have much to pull).

    LOL

    THANKS AGIAN.
  • edited March 2004
    Correction, that works fine on the viewer, but
    when it prints from the viewer, the total picks up
    at some place and gives bad totals.
  • edited March 2004
    Hi Mojoala,

    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.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.