This is the third article of a series that uses ASP.NET and
Crystal Reports to build reports using the Adventure Works Sample Database. Before
reading this article it would be helpful to have read Part
1 and Part
2, but it is not required. This article focuses on redeveloping the Invoice
created in Part 1 using disconnected datasets instead of connecting directly to
the database. Using disconnected datasets gives the developer the flexibility
to manipulate the data and implement rules in a C# business class rather than
in the report.
Before you begin you will need to have installed Visual
Studio 2008 with Crystal Reports for .NET. The samples are written in Visual
Studio 2008, but they will work with Visual Studio 2005 as well. You also will
need to download the AdventureWorks sample database from http://msftdbprodsamples.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18407
for SQL Server 2008. Download and install the
SQL2008.AdventureWorks_All_Databases.x86.msi file. If you do not have SQL
Server 2008, you can use SQL Server 2005, but you will need to download the
2005 AdventureWorks samples.
The goal of this article is to create an invoice that looks
like the following image.
Figure 1

If you have read Part 1 then you will notice that this is
the same report. If you have not read Part 1 then this article will also demonstrate
how to use master\detail records, create formula fields, use variables in a
report, insert groups in a report, dynamically format groups using the Section
Expert, and how to create summary fields.