access 2003 filter a report

B

Bob Perry

In a Grouped Summary Report, how do I filter the records shown by sum for
each group? Example: Sums vary from 1 to 20; I want to show in the report
only those groups with a Sum of 10.
 
A

Allen Browne

You cannot filter a report on a value that is not calculated until after the
report has run. To filter it you will need to get the totals into the source
query somehow.

One approach is to use a DLookup() expression in the query that feeds the
report. This will be slow.

It may be possible to use an aggregate query (i.e. depress the Total button
on the toolbar in query design.) You may find that this totals query does
not give you the details you need, and so you need a subreport to show the
details.

Another possibility is to use a subquery. Here's an introduction:
http://allenbrowne.com/subquery-01.html
However, filtering on a subquery and then grouping a report is likely to
give you 'multi-level group-by not allowed' errors, so may not be
satisfactory.
 
B

Bob Perry

Thank you for the information.

Allen Browne said:
You cannot filter a report on a value that is not calculated until after the
report has run. To filter it you will need to get the totals into the source
query somehow.

One approach is to use a DLookup() expression in the query that feeds the
report. This will be slow.

It may be possible to use an aggregate query (i.e. depress the Total button
on the toolbar in query design.) You may find that this totals query does
not give you the details you need, and so you need a subreport to show the
details.

Another possibility is to use a subquery. Here's an introduction:
http://allenbrowne.com/subquery-01.html
However, filtering on a subquery and then grouping a report is likely to
give you 'multi-level group-by not allowed' errors, so may not be
satisfactory.
 

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