0% found this document useful (0 votes)
31 views9 pages

Crystal Reports

This document provides step-by-step instructions for creating a simple Crystal Report in VB.NET to display data from a Product table. It describes how to open a VB.NET project, add a new Crystal Report item, select the database connection, choose the Product table, add the table fields to the report design surface, and preview the report output using the Crystal Reports viewer control. The goal is to familiarize beginners with basic Crystal Report creation in VB.NET.

Uploaded by

Kibrom Embza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views9 pages

Crystal Reports

This document provides step-by-step instructions for creating a simple Crystal Report in VB.NET to display data from a Product table. It describes how to open a VB.NET project, add a new Crystal Report item, select the database connection, choose the Product table, add the table fields to the report design surface, and preview the report output using the Crystal Reports viewer control. The goal is to familiarize beginners with basic Crystal Report creation in VB.NET.

Uploaded by

Kibrom Embza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

Home AI Data Science Python HTML


JavaScript Java C# jQuery ASP.Net VB.Net

VB.NET Crystal Reports


for Beginners
Start your first VB.NET Crystal Reports
.

All programming samples related to


Crystal Reports in this tutorial are derived
from the following database, namely
"crystaldb". Prior to commencing this
tutorial, it is highly recommended that you
familiarize yourself with the structure of
the database. For your convenience, you
may click on the provided link to access
the detailed Database Structure.

Open Visual Studio .NET and select a new


Visual Basic .NET Project.

1 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

Create a new Crystal Reports for Product


table from the above database crystalDB.
The Product Table has three fields
(Product_id,Product_name,Product_price)
and we are showing the whole table data
in the Crystal Reports.

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.

Microsoft .Net
Framework
Select Report type from Crystal Reports Tutorials
gallery. VB.NET
Language
Basics Tutorials
VB.NET
Program Flow
Control
Tutorials
VB.Net
Graphical User
Interface

2 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

VB.NET
Collections
Tutorials
VB.NET String
Tutorials
VB.NET Files
Tutorials
VB.Net Excel
Automation
Accept the default settings and click OK.
VB.NET Crystal
Reports
Next step is to select the appropriate Tutorials
connection to your database. Here we are VB.NET
going to select OLEDB connection for Communications
Tutorial
SQL Server
VB.NET
ADO.NET
Select OLE DB (ADO) from Create New Tutorial
Connection. ADO.NET Data
Providers
Tutorial
VB.NET
ADO.NET
Dataset Tutorial
ADO.NET
DataAdapter
and Dataset
VB.NET
ADO.NET
DataView
Tutorial
VB.NET
Select Microsoft OLE DB Provider for Remoting
SQL Server . Tutorial
VB.NET XML
Tutorial

3 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

VB.NET
DataGridView
Tutorial

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.

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.

From the tables list select Product table to


the right side list .

4 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

Click Next Button

Select all fields from Product table to the


right side list.

Click Finish Button. Then you can see the


Crystal Reports designer window . You
can arrange the design according your
requirements. Your screen look like the
following picture.

5 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

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 .

Select the default form (Form1.vb) you


created in VB.NET and drag a button and
CrystalReportViewer control to your
form.

Select Form's source code view and put


the code on top.

Imports CrystalDecisions.CrystalReports.Engine

Put the following source code in the


button click event

6 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

Full Source VB.NET

Imports CrystalDecisions.CrystalReports.Engine
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.O
ByVal e As System.EventArgs) Handles Button1.C
Dim cryRpt As New ReportDocument
cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\Crys
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.Refresh()
End Sub
End Class

NOTES:

cryRpt.Load("PUT CRYSTAL REPORT


PATH HERE\CrystalReport1.rpt")

The Crystal Reports is in your project


location, there you can see
CrystalReport1.rpt . So give the full path
name of report here.

After you run the source code you will get


the report like this.

7 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

Hope this tutorial help you to create your


first Crystal Reports.

Next > VB.NET Crystal Reports from multiple

tables

Related Topics

Sample Database and tables for Crystal

Reports tutorials

VB.NET Crystal Reports from multiple

tables

VB.NET Crystal Reports String parameter

VB.NET Crystal Reports Integer parameter

8 of 9 9/26/2023, 5:30 AM
Step by Step help for creating a simple Crystal Reports in VB.NET https://net-informations.com/vb/crystal-report/vb.net_crystal_report_st...

More Related Topics.....

Tutorial Interview Resources


Artificial Questions Colors
Intelligence Python IT and Web
Data Science JavaScript C# Examples
Python Java Windows 11
R jQuery Difference
HTML Data Science Between
JavaScript Oops
Java C#
jQuery .Net
C# Framework
Asp.Net Asp.Net
VB.Net Vb.Net

Search : Mail to : [email protected]

Net-Informations.com (C) 2023


All Rights Reserved. All other trademarks are property of their respective owners.
Home | SiteMap | Terms | About

9 of 9 9/26/2023, 5:30 AM

You might also like