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
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 example screenshots and code snippets.
by Vince Varallo
Feedback
Average Rating: 
Views (Total / Last 10 Days): 59368/ 58

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

User Comments

Title: Help   
Name: Arjun
Date: 2010-05-21 4:28:35 AM
Comment:
Hi! anybody body can assit me to generate Accouting report trial balance, profit & loss, and balance sheet. using crystal report with ASP.NET with C#
Title: Nice Article   
Name: Rick
Date: 2009-12-01 4:56:29 PM
Comment:
I read the entire series and I fell more comforable with reports. They were all put together well and every piece of code worked as expected. Thank for taking the time to share.

Product Spotlight
Product Spotlight 



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


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