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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show highest count in recordset displayed 1

Status
Not open for further replies.

giggles7840

IS-IT--Management
Mar 8, 2002
219
US
Xp/R2/sql server

Im not really sure of the best way to explain this. I need to show only the highest count of records in a group.

Example:

GH1 Title
GH2 Subtitle1 1 12.5%
GH2 Subtitle2 1 12.5%
GH2 Subtitle3 4 50%
GH2 Subtitle4 2 25%
GH2 Subtitle5 1 12.5%

The report only needs to show:
GH1 Title
GH2 Subtitle3 4 50%

How do i identify the records with the highest counts and display only those on the report?
 
You should be able to go to report->group sort->->group#2->topN: 1->count of {table.field}

-LB
 
This works great, however i did just notice one tiny little snag..... occasionally there is an example where the counts might tie and I would need to display both. What would I do to get them both to show up.

GH1 Title
GH2 Subtitle1 1 12.5%
GH2 Subtitle2 1 12.5%
 
In the group sort expert, check "Include ties".

-LB
 
Yay thanks. I was totally trying to over think that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top