Wrong Answers

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I have created a report using office xp and all works OK.
Have moved report to Office 2000 PC. I am doing a
calculating thru the report and I print the total at the
end (its based on footer totals and a few other things).
If I jump to the end page the total is wrong, but if I
step thru each page one at a time the answer is correct.

I dont have this problem with office xp

Ian
 
How is the total being calculated?

If you use the report events (e.g. Detail_Print) to collect the total
programmatically, then what you describe is typical. The events may not fire
for the intervening pages, so the total (and even conditional layout) that
depends on the events will most likely be wrong.

More reliable alternatives include performing the calculation in the
report's source query, or using the RunningSum of a text box to accumulate
the total.

(Presumably you do have the total in the Report Footer section and not the
Page Footer.)
 
Ian said:
I have created a report using office xp and all works OK.
Have moved report to Office 2000 PC. I am doing a
calculating thru the report and I print the total at the
end (its based on footer totals and a few other things).
If I jump to the end page the total is wrong, but if I
step thru each page one at a time the answer is correct.

I dont have this problem with office xp

Ian

Ian,
re: >I dont have this problem with office xp <

You probably do but haven't noticed.
It sounds as though you are using a report (Detail?) print event to
calculate the totals.

If you don't show the page, the print event doesn't fire, and the totals
don't get calculated.

You could move the calculations to the section's Format event, which
does fire whether or not you display the individual pages, but that also
creates problems if Access decides that it can't fit all the data on a
particular page and has to retreat to reformat the page. The calculated
data is not recalculated so you will also get incorrect totals.

Either always step through each page, or place your calculations within
the report detail section using unbound controls to sum up results.
 
Back
Top