Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count group members (not details)

Status
Not open for further replies.

xsw1971

Programmer
Jun 21, 2001
153
US
How do I count the number of members in a group (not its details)?

If "class of animal" is a group and "breed" is its details, how do I count the number of classes that are displayed on the report? I've tried count formulas but it tell me it can't create a formula/running total on that field.

Thanks.
 
Select the field you want to count, e.g. "class of animal" on the detail line, right-click/Insert/Summary, and select "dictinct count" as the type of summary.
 
"Class of animal" is not in the details, only breed for each class. I don't want to know how many breeds there are for each class, I want to know how many total classes there are on the entire report. I can't create summaries/running totals on grouped fields.
 
Hello,
Insert class of animal field into the group header, right click on this field and select insert, then choose your summary.
Cheers,
-Bruce Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
That doesn't work either; it still counts detail. I want it to count the number classes (class IS the group) as if it were just doing a simple distinct count on any normal field.

thanks
 
I'm not sure what is going on in your report. I just threw together a report and tested this. There must be something that you are omitting. I grouped on a value, inserted the same field that i grouped on into the group header, right clicked on the field, selected insert, chose grand total, selected distinct count, and the results show up on the report footer with no count of details. there were 14 groups and the grandtotal at the bottom of the report showed a count of 14 (i had over 7000 records into the details in this test) Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
You're right, I wasn't paying attention. I was selecting count instead of distinct count. It works now. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top