Building Reports using ASP.NET and Crystal Reports - Part 5 - Creating Reports as a Web Service
page 1 of 6
Published: 28 Sep 2009
In this article, Vince walks the user through the process of creating a Crystal Report as a web service and then creating a web site to consume the service. After providing a short introduction, he examines the relevant steps which includes the creation of a web service, adding crystal reports file, and establishing database connectivity using Visual Studio 2008. Towards the end of the article, he examines the creation of a web site with the help of relevant source code and screenshots.
by Vince Varallo
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31593/ 87


This is the fifth 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 read Part 1, Part 2, Part 3, and Part 4, but it is not required.  At a minimum you should read Part 1. This article creates a web service that delivers the Invoice report developed in Part 1. The article then covers creating a web site to consume the web service, filter the report, and display the report to the user using the Crystal Reports Viewer control. Reading Part 1 would be most beneficial because I will use the Invoice.rpt file developed in that article to create the web service. You can also download the code here to get the report file.

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

As stated earlier, this is the same report that was created in Part 1 of this series. The user can select a customer from the drop down list and preview all the invoices for the selected customer.

View Entire Article

User Comments

Title: Possibility in crystal report 2010   
Name: thantowi jauhari
Date: 2011-09-14 11:42:35 AM
is it work for crystal report 2010 ??
Title: Crystal Reports Hosting   
Name: crystaly
Date: 2010-11-24 1:43:36 AM
Just found your nice article. thx
Title: Crystal Rpts Web Service   
Name: Doug
Date: 2010-10-14 4:57:56 AM
Hello Vince,
I was wondering if you had issues with load times while downloading the web service everytime you open the browser again. It takes 15 seconds to run my report the first time then 2 seconds everytime thereafter. Thoughs?
Title: ASP.NET Crystal Reports Hosting   
Name: rajanish
Date: 2009-10-23 1:27:06 AM
good article thanks
if i have more than one reports(.rpt) in web service then how we can call dynamically from report web site
Title: ASP.NET Crystal Reports Hosting   
Name: Helen
Date: 2009-10-14 1:23:14 PM
Excellent Articles!

Nice crystal reports guidance!

Title: Mr.   
Name: Rinoy
Date: 2009-10-13 8:31:30 AM
good article thanks
if i have more than one reports(.rpt) in web service then how we can call dynamically from report web site

Title: Mr   
Name: Kirt Darji
Date: 2009-10-07 12:55:13 AM
Good Artical

crystle Report not run on live server for that what we have to do.

Product Spotlight
Product Spotlight 

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

©Copyright 1998-2024  |  Page Processed at 2024-05-18 4:18:11 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search