How to print QR Code in Crystal Reports for .NET using QR Code .NET SDK for Crystal Reports
Avapose.Barcode for Crystal Reports
  • Reliable QR Code barcode creator library & DLL for Crystal Report .NET
  • Easily print QR Code in Crystal Reports in ASP.NET and .NET WinForms
  • Generate high quality QR Code barcode images in Crystal Reports
Barcode Crystal Report > Barcode in Crystal Report > 2D > .NET QR Code in Crystal Report
Crystal Reports QR Code Creator Component
  • Designed for the development of Crystal Report for .NET
  • Generate QR Code barcode image based on ISO / IEC 18004 (2nd edition 2006-09-01)
  • Easily insert QR Code images into Crystal Reports for Windows and ASP.NET
  • May be controlled by Visual C#.NET and Visual Basic.NET
  • Draw QR Code in reports with high quality graphics objects on Crysatl Report
  • Support creating JPEG, TIFF, GIF, BMP, and PNG image files
  • Simplify data mode setting with auto data mode function
  • Capable to increase white space around the symbol for better readability
QR Code Barcode Generator DLL for Crystal Report, featuring QR Code generation, is an easy-to-use .NET component designed for Crystal Reports in .NET. Programmers may effortlessly insert its QR Code generation features into Crystal Report for .NET.
QR Code Barcode Generator for Crystal Report - QR Code Information
Developed by the Toyota subsidiary Denso Wave in 1994, QR Code is a Matrix (2D) barcode that can contain any alphanumeric text and often encode URLs that direct users to sites where they can learn about an object or place.
QR Code Barcode Generator Control for Crystal Report encodes:
  • Numeric data (digits 0 - 9)
  • Alphanumeric data (digits 0 - 9; upper case letters A -Z; nine other characters: space, $ % * + - . / : )
  • Byte data (default: ISO/IEC 8859-1)
  • Kanji characters
QR Code Barcode Generator for Crystal Report - QR Code Generation

Environment Requirement

Before generating QR Code in .NET, you need to install:
  • Windows 7, Windows Vista, or Windows XP
  • .NET 2.0, 3.0 or later version
  • Microsoft Visual Studio 2005/2008/2010 with Crystal Report Wizard
  • Avapose.Barcode for Crystal Report

Creating a Crystal Report for .NET

  1. Open your Visual Studio and create a new project;
  2. Select the Crystal Report template for Visual C# or Visual Basic;
  3. Name and locate the report;
  4. When the Crystal Report Gallery dialog box appears, accept the defaults of "Use Report Expert" and "Standard Report", and click "OK";
  5. When Crystal Reports wizard dialogue pops up, expand "Create New Connection", and click "ADO.NET";
  6. Browse and find "CustomerDataSet.xsd" in your downloaded sample dataset package (or any other dataset of your own), then click "Finish";

Fields and Style Setting

  1. Click on the Tables node to expand;
  2. Drag and drop the table name to the window titled Tables In Report, and click "Next";
  3. To display fields on the report, select them at the Field tab, and click "Finish";
  4. Modify the form so that it can preview and print the report;

Integration of QR Code Barcode Generator for Crystal Report

  1. Drag and drop the field named "Barcode" to the report in Crystal Report1.rpt;
  2. Open Form1.cs in Design view, and add Avapose.matrixbarcode.winforms.dll to the project reference;
  3. Double click Form1 to enter Form1.cs, and copy the sample code into the method Form_Load;
  4. Using the namespace "Avapose.matrixbarcode" if your report is created in C#.NET;
  5. Run the report;

C# code

privatevoid Form1_Load(object sender, EventArgs e)
{
OleDbConnection aConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Demo/BarcodeDemoData.mdb");
aConnection.Open();
OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Customer"
, aConnection);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
//add a new column named "Barcode" to the DataSet, the new column data type is
byte[]

ds.Tables[0].Columns.Add(new DataColumn("Barcode", typeof(byte[])));
Matrix Barcode = new Matrix();
Barcode. MatrixBarcode = MatrixBarcode. QRCode;
foreach (DataRow dr in ds.Tables[0].Rows)
{
Barcode.BarcodeData = (int)dr["CustomerId"] + "";
byte[] imageData = Barcode.drawBarcodeAsBytes();
dr["Barcode"] = imageData;
}
CrystalReport1 rpt = new CrystalReport1();
rpt.SetDataSource(ds);
this.crystalReportViewer1.ReportSource = rpt;
aConnection.Close();

VB code

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles MyBase.Load

Dim aConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:/Demo/BarcodeDemoData.mdb"
)
aConnection.Open()
Dim dataAdapter As New OleDbDataAdapter("select * from Customer", aConnection)
Dim ds As New DataSet()
dataAdapter.Fill(ds)
'add a new column named "Barcode" to the DataSet, the new column data type is
byte[]

ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte())))
Dim Barcode As new Matrix()
Barcode. MatrixBarcode = MatrixBarcode. QRCode
For Each dr As DataRow In ds.Tables(0).Rows
Barcode.BarcodeData = CInt(dr("CustomerId")) & ""
Dim imageData As Byte() = Barcode.drawBarcodeAsBytes()
dr("Barcode") = imageData
Next
Dim rpt As New CrystalReport1()
rpt.SetDataSource(ds)
Me.CrystalReportViewer1.ReportSource = rpt
aConnection.Close()
End Sub
Related QR Code Barcode Integration & Generation Information
The following QR Code barcode integration and creation information links relate to this product that may be of interest to you:
Avapose.Barcode for Crystal Report Testimonial
We bought your product Crystal Report Barcode Generator a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.