Discussion Locked

MS Access 97 - Report Grouping?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an Access 97 database that I use to track ice hockey statistics.

I've created a number of reports based on this database. Right now I'm working on reports that pull player statistics from the database. Generally, there are two key criteria that play into that, which are in the Game_Info table. They are Season and Game_Type. This is because when we talk about statistics, we usually want to specify the season and the type of game (such as Regular Season vs Playoff games).

I've already created a form that asks for those two criteria, and from there can launch a report that gives all of the player statistics given those criteria. (For example, all player statistics for the 2000-2001 Playoffs)

My problem now is that I'm trying to create a report that will give me the entire history for a given player. This would be as follows:

---------
Player name: Steve Battisti

Regular Season Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total (Obviously a calculated field)

Playoff Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25

Tournament Games Goals Assists
1999-2000 5 10
2000-2001 10 15
Total 15 25
----------

So, for each unique Player_ID, I need to report totals for goals and assists, grouped by Season and by Type (ex. 1999 regular season).

Unfortunately,I haven't a clue how to approach this. I'm certain it has something to do with the Sorting/Grouping, but I can't even figure out how to configure the query to base this on. I've also looked into crosstab queries, but I can't seem to get the info I need. Could be sheer stupidity.

Thanks!

Steve Battisti

5 replies

by peyison

Steve,

If you'd like to email me your database, (with data, or with sample data) I'd be happy to take a look at it. I have a few thoughts on how to do this, but it would help to have the tables to play around with.

You can email me at mike@peyison.com

by Member 36391462

Mike was very helpful and although I'm unable to comprehend most of the work he did, I can't fault him for that! (^_^)

by bowjangles

All you have to do is base your report on a query which will select all data on a particualr player. Something along these lines... SELECT * FROM Table_Name WHERE Player_Name = Forms!cmbPlayerName. When you produce the report a form with a combo box with a list off all the players will appear. Based on which player you select, will depend on which stats are put into the report. From there all you have to do is organize your report in design view the way you like it. If you need a report with all players, eliminate the form with the combo box and base your report on the table, in the grouping section of the report simply group by Player_Name and organize the report the way you want in design view and you should get exactly what your looking for. I hope this helped.

Justin

This discussion is closed to new replies.