[download sample app]
The Player Statistics Report (ffasist2.rpt) is based on the stored procedure p_get_ffStatsWithPlayerTeam. This stored procedure has one parameter, the Player ID, and will display all the statistics for one player. Actually, as currently configured, it will display the passing statistics for the player, so I currently only have quarterbacks in the report!
To display the report, I placed a Crystal Viewer control on the default.aspx page. This page, like all pages in the application, is based on the master page FFMain.master. If I right click the CrystalViewer1 object and then set the report source, the report renders in Visual Studio. This new feature gives you a preview of your report on the page. What a welcome addition!
Also included in the content of this page is a drop-down list with the ID of ddlPlayers. The drop-down list is bound to a SQL DataSource named sqlDSPlayers. This data source is based on a straight query of all players in the table.
The Player Statistics report groups the data by player and year and sorts in game number order. This report also groups and sums by year. Summing is extremely easy in the designer right now. Simply Highlight the field you want to sum in the detail area, right click, select insert the summary. That dialog box allows you to pick the grouping to insert the summary at. It also allows the you to pick the type of summary you want. In this instance, I've inserted averages by the year.