Results double when printing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Grand Total in the Report Footer of my report that is found from
"summing controls calculated by functions". This is the method I used from
Microsoft's knowledge base, article id 208850. It all works fine, except for
the problem below.

When I use Print Preview, it calculates just fine. However, when I print the
report, the Grand Total doubles in value. This does not happen to the Group
Totals.

Can anyone help?

- Steve
 
You probably are not setting values back to zero in the On Print of your
report header section.

Are you sure you need code to sum your values? I have rarely seen reports
where this is necessary.
 
Steve said:
I have a Grand Total in the Report Footer of my report that is found from
"summing controls calculated by functions". This is the method I used from
Microsoft's knowledge base, article id 208850. It all works fine, except for
the problem below.

When I use Print Preview, it calculates just fine. However, when I print the
report, the Grand Total doubles in value. This does not happen to the Group
Totals.


That's not at all unusual when you use code to calculate a
total. Unfortunately, there are a few KB articles that were
not tested thoroughly enough to prevent users such as you
from tripping over their suggested procedure.

In this case, you might(?) be able to get it to work by
adding a call to the InitVars function in the report header
section's Format or Print event. If this doesn't always
work, then you should abandon this approach and find a
different way to get the desired result. A RunningSum text
box is my preferred approach.
 
Duane,

How else would you sum values in a report where the text boxes are unbound.
I thought you could not sum controls in a report?

In a report, which is based on a query, I have a field called
[TypeofComplaint]. I have other fields called [EnrollNoSchools],
[PlacementNoSchools], [APENoSchools] , and [VacancyNoSchools], which are
numbers. In the report, I want to have the total number of each of the fields
for each [TypeofComplaint]. I can do it for only one of them, but I am having
trouble doing it for all.

The report would look like this, grouped by Quarter and then Type of
Complaint:

Q1-2005

"Type of Complaint" "Number of Schools"
Enrollment 14
Placement 5
APE 3
Vacancy 4

Total 26

Thanks.

- Steve
 
I would think that you could create a totals query and use it as the record
source of a subreport. This would be much more efficient.
Place the subreport in the "Quarter" footer and link master/child on the
"Quarter" calculation.
--
Duane Hookom
MS Access MVP
--

Steve Albert said:
Duane,

How else would you sum values in a report where the text boxes are
unbound.
I thought you could not sum controls in a report?

In a report, which is based on a query, I have a field called
[TypeofComplaint]. I have other fields called [EnrollNoSchools],
[PlacementNoSchools], [APENoSchools] , and [VacancyNoSchools], which are
numbers. In the report, I want to have the total number of each of the
fields
for each [TypeofComplaint]. I can do it for only one of them, but I am
having
trouble doing it for all.

The report would look like this, grouped by Quarter and then Type of
Complaint:

Q1-2005

"Type of Complaint" "Number of Schools"
Enrollment 14
Placement 5
APE 3
Vacancy 4

Total 26

Thanks.

- Steve


Duane Hookom said:
You probably are not setting values back to zero in the On Print of your
report header section.

Are you sure you need code to sum your values? I have rarely seen reports
where this is necessary.
 
Back
Top