Rich said:
It's not a subreport. The statistics for all of the records in the date
range (statistics for the organization as a whole) is in the "report header"
section of the report. The statistics for the individual members is in the
"page detail" section of the report.
My report is generating a page for every record within the date range. Each
page of the report looks at the "caregiver" field and compiles statistics
based on all of the other records in the date range with the same value in
the "caregiver" field.
If there are 15 records in the date range and only 4 different values in the
"Caregiver" field, I only need 4 pages in the report (plus the "report
header" page) - but I get 15. Each of the 11 "extra" pages are an exact copy
of one of the other 4 pages.
I was assuming it was a simple "setting" that I was overlooking. Maybe it's
a more complicated issue.
I guess I don't know what other information to provide. Maybe I should be
using a subreport and that is what my problem is. I don't know anything
about them, so I'll study the subject and see where that leads me...
"I see", said the blind man. ;-)
It sounds like you actually have no use for the individual
detail records and only want to aggregate some values for
each care giver. In this case, I think you should probably
use a Totals type query as the report's record source. This
way, the calculations would be done by using Count, Sum, Avg
functions in calculated fields in the query (instead of what
you are doing in the report).
I don't know what calculations you want to do, but a query
something like this may get you started:
SELECT CareGiver, Count(*) As Incidents,
Sum(hours) As Totaltime, . . .
FROM sometable
WHERE whatever
GROUP BY CareGiver
If your calculations can be done that way, the report will
then be trivial. (I don't think a subreport approach can be
better so you can skip that idea.)
For more complicated calculations, you can do what you are
doing now (whatever that is?), but add a group level with
footer on the Caregiver field. Then place the calculated
values in text boxes in the group footer section and make
the detail section invisible.
A major concern with this latter approach is that you might
be tempted to try to use code in the detail section's Format
or Print events to calculate results from multiple detail
records. Regardless of any considerations, do not sucumb to
this temptation. This is not a reliable calculation
technique because the records can be processed as many times
and in whatever order Access needs to deal with the report's
property settings. A good rule of practice is to back away
from this idea and put more effort into getting the record
source query to do the work instead of making the report
more complicated.