Count separate items in report

gschimek

Registered User.
Local time
Yesterday, 22:32
Joined
Oct 2, 2006
Messages
102
I have a report that lists a person's name and their shirt size. How can I show totals of each shirt size on the report? I'm thinking it has something to do with the count function, but I can't figure it out.

For example:

M=27
L=30
XL=10
 
Make a query with group by like:
Select Name, Count(Size) from YourTable
Group By Name
 
gschimek said:
I have a report that lists a person's name and their shirt size. How can I show totals of each shirt size on the report? I'm thinking it has something to do with the count function, but I can't figure it out.

For example:

M=27
L=30
XL=10

To keep a simple running total, open a textbox and enter the fieldname with the following in it:

=[YourFieldName]

Then choose over all from the sum properties for that textbox. I do this for several reports that have mulitple items and it keeps a running total for each of them at the bottom of each page.

On Edit: Wanted to add that this presumes that the fieldName has a numeric property :)
 
Last edited:
It was bothering me that a running sum couldn't be kept for non-numeric fields, so I looked a bit deeper and found the answer:

=Count(IIf([Shirt_size]="M",0))

Where: Shirt_size is the name of your field. When put in an unbound textbox in the report footer, it will keep a running total of the number of shirts that equal "M" for medium.
 
I hope someone out there can help. I have a report which was built through
an existing query. It does the following. I have a meetings database set up
and I set up a query to show only those records relating to a specific
meeting using a perameter query and this works fine. What I would like to do
is put in the footer of the report page a count (so it will count the number
of records/people attending the meeting) I have tried using the =Count(*) in
a text box in the footer but it just comes back with an #error can anyone
help with this I would appreciate it. thanks!
 
If you're using the * in your count function, that's probably the issue. Have it count a specific field or fields if there isn't one that's unique. I've used this and it works great.

Code:
="Total: " & Count([FirstName] & [LastName])
 

Users who are viewing this thread

Back
Top Bottom