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

Sorted Summary

Status
Not open for further replies.

bez999

Programmer
Oct 3, 2003
99
GB
My database is to do with Horse Racing and I have written a report to analyse tipster results.
I have created a summary report that is grouped on tipster and totals on winnings. The report is in tipster order but it would be really useful if I could sort the summary on the summed winnings so that I could see who is the best to worst tipsters.

Is this possible?

Thanks for your help.

Regards
Chris Bezant
 
Here's one way to do it. Create a query like this.

SELECT Table.Tipster, Sum(Table.Winnings) as SumOfWinnings
FROM Table
GROUP BY Table.Tipster
ORDER BY Sum(Table.Winnings) DESC;

Then create another query that joins this query with the Details information table/query on the Tipster field. Then use this query as the source for your Report. Add a Tipster Header to the Report with the Tipster field and the SumofWinnings field in it. Set the SumOfWinnings field Visible property to No. Then in the Sorting and Grouping, select the SumofWinnings field and set it Decending. This will give you the sort you want and leave all the Details intact.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top