This is the sixth 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
4, or Part
5 but it is not required. This article will create a Sales Forecast report
using the AdventureWorks database. The report will use parameter fields to
prompt the user for a sales forecast factor to be applied to historical sales
and a date range to filter the report. You will then build a web page to
display the report to the user using the Crystal Report Viewer control.
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 also. 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'll need to download the 2005
The goal of this article is to create a web page that looks
like the following image.
This report uses the SalesOrderHeader table to determine
prior sales and then applies the sales forecast factor, in this sample 5%, to
calculate the sales forecast. Creating parameters in Crystal Reports is quite
simple and it gives you the power to customize a report at runtime rather than