What is crystal report and how is it used in .NET?

Hello
What is crystal report ?

Hi,

Crystal report is an integral part of Visual Studio .NET and it is a popular window based report writer. The purpose of using in .net is it used to create report from a variety of data source with minimum of written code.So that you can easily set formatting, grouping, charting, and other criteria.Using this you can create anew report or modify the existing report.

Hope this helps you.

Hello Vembutech

Thanks for providing me this good information.
Can you explain, how to create report and how to connect with a .NET project ?

Thanks!

Hi,

To create report and how to connect with a .NET project ,Please follow the below steps:

1.Open Visual studio .NET and select a new Visual Basic.NET project.

2.From main menu in Visual Studio select PROJECT–>Add New Item . Then Add New Item dialogue will appear and select

Crystal Reports from the dialogue box.

3.Select Report type from Crystal Reports
gallery.Accept the default settings and click OK.

  1. select the appropriate connection to your database. Here we are going to select OLEDB connection for SQL Server
    Select OLE DB (ADO) from Create New Connection .

5.Select Microsoft OLE DB Provider for SQL Server.

6.Next screen is the SQL Server authentication screen . Select your Sql Server name , enter userid , password and select

your Database Name . Click next , Then the screen shows OLE DB Property values , leave it as it is , and click finish.

7.Then you will get your Server name under OLEDB Connection from there select database name (Crystaldb) and click the

tables , then you can see all your tables from your database.

8.From the tables list select Product table to the right side list .Click Next Button
and select all fields from Product table to the right side list .

9.Click Finish Button. Then you can see the Crystal Reports designer window .

10.Now the designing part is over and the next step is to call the created Crystal Reports in VB.NET through Crystal

Reports Viewer control.

11.Select the default form you created in VB.NET and drag a button and CrystalReportViewer control to your form.

12.Select Form’s source code view and put the code on top

Imports CrystalDecisions.CrystalReports.Engine

13.Put the source code in the button click event.

After you run the source code you will get the report .

For more details reference this link http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm#

1 Like