Report totals change when detail section hidden!

G

Guest

Hello -
I have a report with a subreport which has subreports on it. I believe I
have set everything up correctly so the totals from each section appear in
the main report footer. All looks well until I hide the detail section of
the main report or hide the subreport so that only the totals page will
print. Then the totals in the report footer change! I am at my wits end and
would appreciate some help. I am pretty good with reports, but no pro at VB.
Try to keep it simple, please!
 
A

Allen Browne

If you are using code in the events of the report, and you then hide the
sections, you may well find that the events do not fire, so the code does
not run, so the amounts do not get updated.

The solution will probably be to use queries instead of reports to get these
totals. This might involve things like:
a) applying criteria to remove records before the report opens;
b) making a Totals query (GROUP BY clause);
c) making a stacked query (query that uses another query as an input table);
d) using a subquery (complete SELECT statement inside another query);
e) assigning the RecordSource of the report in its Open event;
f) writing the SQL property of the QueryDef before the report opens.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top