Hiding Records in Report, Displaying Totals

M

Matt

Hello! I am building a report based off of a query that only uses three
fields, a create time a user id and an incident number. I created a
report that will display these based on grouping by month on the create
time field. Using the =[RecordCount] through the control source field,
the report will display the total number of incidents for that month.

However, the report also listed each and every incident for the month
and then the total. Since I'm working with many, many records, I'd like
the report to just display the month and the total number of incidents
for the month (rather than listing each and every one). Is there any
way I can accomplish this?

Thanks!
 
M

Marshall Barton

Matt said:
Hello! I am building a report based off of a query that only uses three
fields, a create time a user id and an incident number. I created a
report that will display these based on grouping by month on the create
time field. Using the =[RecordCount] through the control source field,
the report will display the total number of incidents for that month.

However, the report also listed each and every incident for the month
and then the total. Since I'm working with many, many records, I'd like
the report to just display the month and the total number of incidents
for the month (rather than listing each and every one). Is there any
way I can accomplish this?


Rather than trying to munge the report to do this, you
should create a query that returns the desired data
aggregations (Count, Sum, etc). E.g.

SELECT Month(incidentdate) As MonthNum,
UserID,
Count(*) As IncidentByUser
FROM table
WHERE . . .
GROUP BY Month(incidentdate), UserID

The total number of incidents for the month can then
calculated in the month group footer section by using a text
box with the expression =Sum(IncidentByUser)
 

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