summing in a report

G

Guest

I tried to create a report that takes the sums of numbers stored in multiple
tables and display them. When I run the report to preview it, I get results
that are 4 times the actual returns (example: a "sum" of 1 =4). I use the
Wizard to create the report utilizing the "summary options" button to
generate the calculations. I tried to use a query to control the additions,
but I get a message that says there is an error in the expression (the field
uses a time - 7:00 and edits out the 7 to show only the :00).

How do I get the report to show the correct sums and not the multipled values?
 
A

Allen Browne

Imagine you have a query that contains 2 tables, with a one to many
relation. And say a record in Table1 has 4 related records in Table2. Then
the query will show 4 rows with these details, i.e. the record from Table1
will show up on 4 rows. Then when you sum the field (in a report), the value
is included 4 times.

If that's what's going on, you might be able to solve it by using a report
with a subreport. The main report is bound to Table1, and the related
records from Table2 are shown in the subreport. That way the record appears
only once in the main report, so when you sum the values, it is not repeated
4 times.
 
G

Guest

Thanks - I was actually pulling from 4 tables and while I have used subforms,
I never thought to make use of subreports. Again, thanks!
 

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