basic crystal report tutorial with example
basic crystal report tutorial with example
In this article I will explain a tutorial with an example, to create a basic Crystal Report in Windows
Forms (WinForms) Application using C# and VB.Net.
The Crystal Report will be populated using Typed DataSet in Windows Forms (WinForms)
Application using C# and VB.Net.
Note: By default, Visual Studio 2010, 2012 and 2013 does not include Crystal Reports henc
e you need to download the Crystal Reports 13. Refer my following articles.
Download Crystal Reports for Visual Studio 2010, 2012, 2013, 2015 and 2017.
Database
Here I am making use of Microsoft’s Northwind Database. The download and install instructions
are provided in the following article.
2 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
In the DataTable we need to specify the column names that we want to display in the Crystal
Report.
Note: The Column Names of the DataTable must exactly match with the actual Database T
able column names.
By default all the columns are of String Data Type but you can also change the data type as per
your need.
3 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
As soon as you click OK you get the following dialog. You must select Using the Report Wizard
option.
Once you press OK in the above dialog, the Report Wizard starts and you get the following dialog
where you need to choose the type of Database connection for your Crystal Report. Since we are
using DataSet we will choose the Customers DataSet.
4 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
Next the Wizard will ask for the Columns or Fields from the Customer DataSet you need to display
on the Crystal Reports. You can choose either all or specific fields as per you choice.
5 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
Note: There are more steps in the Wizards but those are Optional hence are not included in
this article.
Once you click Finish your Crystal Report should look as below.
6 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
the Toolbox.
Note: If you are unable to see CrystalReportViewer in the Visual Studio ToolBox, please ref
er my article Crystal Report Viewer missing from ToolBox in Visual Studio 2010.
Once you add the CrystalReportViewer control to the Form, your Form must look as below.
Code
7 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
VB.Net
8 of 10 9/26/2023, 6:03 AM
Basic Crystal Report Tutorial with example in Windows Forms WinFo... https://www.aspsnippets.com/Articles/Basic-Crystal-Report-Tutorial-wi...
Screenshot
Note: If you get the following error while running the above application, please refer my arti
9 of 10 9/26/2023, 6:03 AM
cle Crystal Reports: Could not load file or assembly crdb_adoplus.dll.
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal
Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x
86\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file spe
cified. Company
Downloads
Download Code
Explore Follow us
Download Free Word/PDF/Excel API