Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 20th, 2007, 02:48 PM
Registered User
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to create a crystal report in asp.net 2.0


I tried to create a crystal report but all in vein.

Actually the problem is that it is connecting with database.

I m writing the steps which i have followed

1) First of all I add a new item form the solution explorer ie crystal report.

2) After adding , a pop up window is open (Crystal Report Gallery).

3) Then i selected using report wizard option.

4) After that a new popup window is open Standard report creation wizard, there i select database files option.It asks for file to open.When I select my database from my app folder, then it shows error something like failed to logon. and it also asks for class name.

Please solve my problem and tell me in detail how to create crystal reports in asp net 2.0 and other methods if available.

I will be very thankful to u.
Old August 27th, 2007, 05:27 AM
vbn vbn is offline
Authorized User
Join Date: May 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts


The following are the steps which have to followed to develop the report. We have used the Pull Model to develop this report.

Steps to develop the report:

a. The format in which the data is to be displayed is decided.
b. Create the rpt file and design the format.
c. How to integrate report into Visual Studio 2005 Application
d. Connect the report to the Menu and view the report.

b. Create the rpt file and design the format.

We will use the manual method, to place the fields in the report. To create a format manually, we perform the following steps:

1.Right-click the project name in the Solution Explorer window and point to Add from the shortcut menu. Then, click Add New Item from the Add shortcut menu option.

2.The Add New Item – FinancialVbApp dialog box is displayed. Select Crystal Report from the Templates pane.

3.By default, the rpt file is named as CrystalReport1.rpt. Name the Crystal report and click on Add button. After we enter the name, Crystal Report Gallery displays three radio buttons, which are discussed below:

a.Using the Report Wizard- This option guides us through the process of report creation and creates the report based on the choices that we make, such as the fields to be included in the report, fields to group the data and filtering criteria for displaying data in the report.

b.As a Blank Report- This option opens the Crystal Report Designer where we can add the fields to be displayed in the Crystal Report.

c.From an Existing Report - This option creates a new Crystal Report with the same design as another report that we specify.

We will use the option b. Select the As a Blank Report radio button and click OK. The Report Designer is displayed with the sections Report header, Page header, Details, Report footer, and Page footer.

The Field Explorer window is displayed on the left side of the screen. If the Field Explorer window is not visible by default, Select View - Other Windows - Document Outline to view the Field Explorer window.

The next step is to connect to the database and select the fields from the database table to be displayed in the Trial Balance report. To do so, we perform the following steps:

a.Right-click Database Fields in the Field Explorer window and then select Database Expert from the shortcut menu.

b.A list of data sources is displayed under the Data tab of the Database Expert

c.Expand the OLEDB (ADO) folder under Create New Connection folder and then select Microsoft OLE DB Provider for SQL Server from the Provider list. Then Click Next button.

d.Provide information such as the SQL server name for connection, the user ID and password for connecting to the server, and the database from which we add data to the Crystal Report and click on the Finish button.

e.The Database Expert dialog is displayed as shown in Fig 9.6, containing the available data sources in the Available Data Sources pane. We can add tables from a data source by expanding the database and select the table, and clicking on the button with the symbol (>) to add the table in the Selected tables pane.

After we click the OK button, the Database Fields node in the Field Explorer window displays a list of tables and their columns. We can add a table column by dragging the column from the Field Explorer window into the Report Designer

Drag the columns from Field Explorer and place them in the Details section

For the following details, refer the book titled:

Database programming using Vb.net and C# 2005 and Sql server 2005

Procedure to create a formula field
Creating Running Total Fields
How to integrate the report into the windows application.
Connect the report to the Menu and view the report.
Creating the Group Fields
Connect a Crystal report to an ADO.NET DataSet.
Bind the report and Set the DataSource to the Populated DataSet.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report problem in ASP.Net aliirfan84 ASP.NET 2.0 Professional 0 July 11th, 2007 02:11 AM
using crystal report with asp.net ehc2082 Crystal Reports 0 January 6th, 2005 10:33 PM
crystal report in asp.net wynn ASP.NET 1.x and 2.0 Application Design 1 June 14th, 2004 10:16 AM
crystal report in asp.net wynn BOOK: Professional Crystal Reports for VS.NET 1 June 12th, 2004 05:29 AM
asp.net Crystal Report chinhow Crystal Reports 0 February 19th, 2004 10:13 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.