Building Reports Using ASP.NET and Crystal Reports - Part 6 - Build a Sales Forecast Report Using Parameter Fields
page 1 of 12
Published: 09 Nov 2009
Unedited - Community Contributed
Abstract
In this sixth part of the series, Vince examines the creation of a sales forecast crystal report based on the AdventureWorks database in a series of steps. He initially provides a brief outline of creating a new solution in Visual Studio 2008 and database connectivity and then demonstrates the usage of parameter fields and formula fields in addition to building an ASP.NET web page to execute and preview the report with the help of exammple screenshots and code snippets.
by Vince Varallo
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 1628/ 1135

Introduction

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 1, Part 2, Part 3, 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 AdventureWorks samples.

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 design time.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 2 and 4 and type the answer here:

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 



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


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 8:00:09 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search