Sample Application: FFAssist using Crystal .NET for Visual Studio 2005 - Part 3
page 2 of 5
by Eric Landes
Average Rating: 
Views (Total / Last 10 Days): 24327/ 65

Report Setup

To create the report, I used the DataSet referenced later in this article (in the Creating the Data Object section) as the data source.  The report will render players' totals and averages per year.  Let's set up the Report!

In my Visual Studio Project, I add a new item (right-click on the Project) and select a Crystal Report, and name it PlayersWithYards.rpt. 

Figure 1:


Next, select the "Using the Report Wizard" option to begin the creation of the report.  I did some additional formatting of the report after using the wizard, so feel free to use the downloaded report if you do not wish to repeat this process.  We'll step through the initial creation of the report to get the feel for how similar this is to using a SQL statement or stored procedure. 

Once you accept the Standard report wizard, the Data tab is displayed.  Because the Business Object is in a different Project (named FFBusinessObjects), select ADO.NET from the "Create a New Connection" option.  I then browsed in the File Path box to the FFAssistantDataSet.xsd DataSet schema found in the FFBusinessObjects project (in my case C:\Dev\FFAssistant\FFBusObjects).  You then need to select all the available tables (Players, Positions, Stats, and Teams). 

In the next dialog box, you need to create the relations between Teams and Positions, to Players.  You're probably already familiar with this, but simply drag and drop the TeamID from Teams to the Players table.  Do the same thing with the PositionID from the Positions table to the Players table.

In the next dialog box (Fields to Display), select the Position field from the Position table, PlayerName from the Players table, all the Passing fields (PassingYds, PassingAttmpts, PassingCmplt, PassingTDs, Interceptions, and PassingLong), Year and Gamenumber from the Stats table, TeamCity, and TeamName from the Teams table. 

In the Grouping dialog box, select PlayerName then Year.  In the next dialog, you are asked what fields to sum.  Remove all of the sums at the PlayerName Grouping level.  Also remove the sum of Year and GameNumber at the Year level. 

In the next Group Sorting dialogue box, leave the ordering on none.  In the chart dialogue box, be sure to accept the default. Next, don’t add anything in the Record selection dialogue box.  Finally, select the Leading Break Style in the next dialogue box.  You've now created the Report. 

View Entire Article

User Comments

Title: Crystal Report for Visual Studio 2005   
Name: waiche
Date: 2006-02-09 9:31:58 AM
Help me ! I used Crystal Report in ASP.NET pages with VS2005. When I used ASP.NET Development Server to test, it is ok. But I used IIS Server to test, it throw an error. (Error: Report load fail). Report can't display
(my email:
Title: Problems about SQLEXPRESS db version   
Name: Sabry
Date: 2005-11-08 10:26:59 AM
Title: re: Abdullah Alshuaili   
Name: Daniel Nico
Date: 2005-11-08 7:27:47 AM
How do you set a relative path to a datasource location in Crystal Reports? Please let me know how you did this.
Title: very nice   
Name: Abdullah Alshuaili
Date: 2005-09-07 5:22:26 PM
Thank u very much a useful page, it was better if u set relative path instead of absloute in case of crystal reports in vb .net !!!!

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-23 2:47:51 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search