How to generate and print QR Code barcode in local reports (RDLC) in C#.NET or VB.NET projects
Avapose.Barcode Generator for RDLC
  • Compatible with .NET Framework 2.0, 3.0, 3.5, 4.0
  • Create and print quality QR Code barcodes in client report definition (rdlc) files
  • Easily export RDLC report to PDF files or Excel with QR Code barcode in images
QR Code Creation in Local Reports
  • Easily integrate dynamic QR Code barcode images into Local Reports (RDLC)
  • Completely developed in C#.NET with strong-named and signed DLLs
  • Compatible with Visual Basic.NET, Managed C++, and Borland Delphi for .NET
  • Generate high-quality Gif, Png, Jpeg, or Tiff QR Code image
  • Managed code 100% build in Visual C#
  • Generated QR Code is compatible with International Standard : ISO/IEC 18004
  • Easily export QR Code image to PDF and html files through C# and VB.NET
  • Display QR Code in four different angles ( 0, 90, 180, 270 degree)
QR Code Barcode Generator Control for RDLC is a desirable and robust barcode component that let you easily insert QR Code images into Client RDLC report with high quality. The generated QR Code image can be easily export to other files such as PDF, html, Excel without any image distortion via C# and VB.NET. Besides generating QR Code, other 20+ barcode symologies are available with this barcode SDK for RDLC.
Barcode Generation for RDLC Report Files - QR Code Information
QR Code is a kind of 2D barcode symbology capable of encoding all types of data, such as numeric and alphabetic characters, Kanji, Kana, symbols, binary, control codes, etc. QR code symbol versions vary from version 1 to version 40. Each version has a different module configuration that ranges from 21x21 modules (version 1) to 177x177 modules (version 40). QR Code has error correction capability to prevent data from damaging. Four levels of error correction (L, M, H, and Q) are available for users to choose according to the operating environment.
QR Code Barcode Control for Cient RDLC report encodes:
  • Numeric characters: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Alphanumeric characters: 0-9, A-Z, space, $, %, *, +, -, ., /, :
  • Binary
  • Kanji/Kana
Barcode Generation for RDLC - QR Code Generation

Requirements:

Before generate QR Code in RDLC, you should install:
  • Windows 2000, Windows XP, Windows Vista, Windows 7,etc
  • .NET Framework 2.0, 3.0, 3.5, 4.0
  • Microsoft Visual Studio (any version)
  • Microsoft SQL Server 2005 (any version) or greater with Adventure Works sample database installed
  • Avapose.Barcode for RDLC

QR Code Generation in RDLC in .NET WinForms Applications

  1. Open Visual Studio and create a new Windows Forms project naming "RDLC Barcode Demo";
  2. Add a new "DataSet" to the project:
    • Create a new "DataSet" and name it "AdventureWork.xsd";
    • Drag and drop "TableAdapter" to your created DataSet in toolbox;
    • Create a new connection or use existing connection to SQL Server AdventureWorks Sample Database;
    • Keep "Use SQL statements" to access the database and input "SELECT ProductID, Name FROM Production.vProductAndDescription WHERE (CultureID = N'en')" as SQL statements;
    • Right click "vProductAndDescription" on the DataSet to create a new column in the "DataTable" and name it "Barcode";
    • In the "properties" window, change this barcode "DataType" to "System.Byte[]";
  3. Create a new report:
    • Create a new report and name "Report1.rdlc";
    • Drag and drop a "Table" onto the report;
    • Add three columns in DataSet "AdventureWorks.xsd" to the report table details section, and drag an "Image" to the last column "Barcode";
    • In the "properties" window, set image item property "MIMEType" to "image/jpeg", "Source" to "Database" and "Value" to "=Fields!Barcode.Value";
  4. Drag "ReportViewer" control:
    • Drag a "ReportViewer" to "Form1.cs";
    • Choose "Report1.rdlc" report, and click "Rebind Data Source";
    • In the "Report.rdlc" page, click "Report", and select "Data Source";
    • Add "AdventureWorks_vProductAndDescription" to report data source;
  5. Add "Avapose.matrixbarcode.winforms.dll" to .NET project reference from the "Solution Explorer";
  6. Copy the following code accordingly into the method Form1_Load and run the project. You can get the QR Code images displayed on the report.

C# code

private void Form1_Load(object sender, EventArgs e)
{
// load data to the data table this.vProductAndDescriptionTableAdapter.Fill
(this.AdventureWorks.vProductAndDescription);
// create a linear barcode object
Matrix barcode = new Matrix();
// set barcode type
barcode.MatrixBarcode = MatrixBarcode.Qrcode;
// draw barcodes for each data row
foreach (AdventureWorks.vProductAndDescriptionRow
row in this.AdventureWorks.vProductAndDescription.Rows)
{// set barcode encoding data value
barcode.Data = row.ProductID.ToString();
// set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Jpeg;
row.Barcode = barcode.drawBarcodeAsBytes();
}
this.reportViewer1.RefreshReport();
}

VB code

Private Sub Form1_Load(ByVal sender 
As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code
loads data into the 'AdventureWorks.vProductAndDescription' table.
You can move, or remove it, as needed.
Me.vProductAndDescriptionTableAdapter.Fill
(Me.AdventureWorks.vProductAndDescription)
Dim barcode As New Matrix()
barcode.MatrixBarcode = MatrixBarcode.Qrcode
Dim row As AdventureWorks.vProductAndDescriptionRow
For Each row In Me.AdventureWorks.vProductAndDescription.Rows
' set barcode encoding data value
barcode.Data = row.ProductID.ToString()
' set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Png
row.Barcode = barcode.drawBarcodeAsBytes()
Next
Me.ReportViewer1.RefreshReport()
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:
Testimonial for Avapose.Barcode for RDLC
We bought your Barcode Generator for RDLC a few weeks ago, and it works pretty well
Carios Louis, Eureka Software Ltd,UK