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 top 2 values for each group

Status
Not open for further replies.

wvandenberg

Technical User
Oct 24, 2002
125
CA
I have a report that shows vehicles grouped by "Class". Each vehicle has a number of votes and I would like the report to only show the vehicles with the highest and second highest number of votes (first and second place). I've tried using the TopValues property of the underlying query but there is no option for TopValues = "2" nor have I figured out how to assign the TopValues to a specific field rather than the whole query. Can anyone suggest how I would go about doing this?

Thanks,
Wendy
 
in the GENERAL sense, Help (F1) is help enough on "TOP Values" predicate. It accepts more value types than you are aware of.

In terms of forms and reports, it is probably not sufficient. W/O the details of what you already have, I can't really (really, really) say, but typiclly a report just prints all of the records in some fashion, so the records need to be 'filtered' at the report recordsource level. It may be possible to filter the report in an event (onPrint?), but it will at least require some code (events ALWAYS require code to accomplish their purpose).



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top