.NET RDLC Reports QR Code Barcode Generator
Mature, Easy-to-use .NET RDLC Barcode Generator Library for QR Code
- Professional RDLC Reports .NET Barcode Generator for QR Code 2D barcode
- Written in C# with integration into .NET framework 2.x, 3.x, and 4.x version
- Supporting Visual Studio 2026, 2022, 2019, 2017, and early verions ReportViewer Local Reports (RDLC)
- Generate multiple QR Code barcodes in RDLC Report with data from database
- Print QR Code 2D barcodes in Report RDLC in Jpg, Png, Gif and Bmp image formats
- Create QR Codes images and adjust barcode settings easily with C# and VB.NET
- Perpetually royalty-free developer license available for purchase
BarcodeLib provides step by step tutorials for printing barcodes in RDLC reports using C# in ASP.NET and Windows Forms applications.
Introduction
QR-Code is a widely used 2D symbology developed by Denso Wave. It is also known as Quick Response Code, Denso Barcode, QRCode, JIS X 0510, ISO/IEC 18004.
Compatibility: All the QR Code barcode images created with BarcodeLib Barcode for RDLC Report control are definitely compatible with
ISO/IEC 18004 bar code symbology specification.
How to Create and Print QR Code in RDLC reports?
-
Go to c# file where barcode image will be created and customized.
- For ASP.NET web application, open file
Default.aspx.cs
- For WinForms application, open file
Form1.cs
-
Comment out or remove the existing
LinearRDLC barcode generation code, and insert the following code.
//LinearRDLC barcode = new LinearRDLC();
//barcode.Type = BarcodeType.CODE128;
QRCodeRDLC barcode = new QRCodeRDLC();
barcode.ResizeImage = true;
barcode.ImageWidth = 300;
barcode.ImageHeight = 300;
barcode.ImageFormat = ImageFormat.Png;
Run the ASP.NET web application in Visual Studio:
How to Print QR Code with Specified Size in RDLC Reports
This section explains how to print barcodes with a specified image width and height in RDLC local report files for C# ASP.NET and WinForms applications.
The WinForms tutorial is used for demonstration; the same principles apply to RDLC Reports when binding image data to report items.
The following step by step instructions illustrate generating a QR Code with a side length of 3 cm in a C# ASP.NET (.NET Framework) project.
Step 1. QR Code Image Resolution and Size Settings
- Open
Default.aspx.cs in Visual Studio 2022.
- Add the following C# code in the
Page_Load method.
- Create a new
QRCodeRDLC object.
- Set the unit of measure to
INCH.
- Set the QR Code image width and height to 2 inch.
- Set the image resolution to 300 ppi (high resolution improves printed quality).
QRCodeRDLC barcode = new QRCodeRDLC();
barcode.ResizeImage = true;
barcode.UOM = UnitOfMeasure.INCH;
barcode.ImageWidth = 2;
barcode.ImageHeight = 2;
barcode.Resolution = 300;
barcode.ImageFormat = ImageFormat.Png;
Step 2. Update the Barcode Image Object in the RDLC Report Designer
- Open Report1.rdlc in design mode in Visual Studio.
- Select the barcode image item in the report designer. Update the following properties:
- Set Width to 2 inch
- Set Height to 2 inch
- Right click the barcode image item and choose Image Properties... in the popup menu.
- Navigate to the Size tab, select
Fit to size, and click OK.
Step 3. View and Measure the QR Code Size in the RDLC Report
- Run the ASP.NET web project in Visual Studio and view the barcodes printed in the report in browser.
- Export the report to PDF and measure the QR Code dimensions. The QR Code in the PDF file will measure 2 inches.
How to Encode Text in QR Code in RDLC Reports
Encoding text into a QR Code is straightforward. Assign the desired text to the Data property, and the QR Code RDLC library will convert it into a QR Code image within the report.
Encode QR Code with Unicode Text
To convert Unicode text to a QR Code image, enable the EncodeUnicodeText property. The library will automatically encode the Unicode text supplied in the Data property.
Encode QR Code with GS1 Text Message
To generate a GS1 compliant QR Code, set the
FNC1Mode property to
QRCodeFNC1Mode.FirstPosition and provide the GS1 defined data format in the
Data property.
barcode.FNC1Mode = QRCodeFNC1Mode.FirstPosition;
How to Print QR Code with Colors and Image Settings Applied in Reports
Print QR Code with Styled Colors
Using the RDLC QR Code Generator library, colors can be customized for QR Codes in RDLC reports for C# ASP.NET and WinForms applications.
- Customize QR Code module colors using the
ModuleColor property.
- Customize the background (space modules) color using the
BackgroundColor property.
barcode.ModuleColor = Color.Blue;
barcode.BackgroundColor = Color.White;
With the above settings, QR Codes with blue modules are printed in the RDLC report.
High Resolution QR Code Images for Printing
High resolution QR Code images enhance print quality. Set the
Resolution property to the desired DPI value.
barcode.Resolution = 300;
When the RDLC report is exported to PDF, the QR Code image will be rendered at 300 dpi, as can be verified by viewing the PDF at 800% zoom in Acrobat.
QR Code Advanced Options in RDLC Reports
The QR Code ISO and GS1 standards define several advanced options, including:
- QR Code Data Mode
- Error Correction Level (ECL)
- QR Code Versions
- FNC1
Detailed instructions for applying these options in C# are available here:
How to create QR Code with advaned features customized using C#.
Summary
The core workflow for generating QR Codes in an RDLC Local Report is as follows:
- Initialize a QRCode barcode object.
- Configure encoding data, size, colors, and advanced options as needed.
- Generate the QR Code byte stream.
- Bind the byte stream to an RDLC Image report item.
- Render the report through the ReportViewer Control in ASP.NET or WinForms.
You can do customization on parameters, include Data (text to encode), UOM, BarcodeWidth (and optionally BarcodeHeight for rectangular QR Codes), Resolution, ForeColor, BackColor, and GS1 specific settings like FNC1. These settings must align with the properties of the RDLC Image report item to ensure accurate rendering.
.NET Barcode Tutorial & FAQ:
Provides High Quality .NET Barcode, .NET WinForms Barcode, ASP.NET Barcode, C#.NET Barcode, VB.NET Barcode, QR-Code .NET, QR-Code ASP.NET, QR-Code WinForms, QR-Code C#, QR-Code VB.NET, QR-Code .NET SSRS, QR-Code .NET Crystal Reports, QR-Code .NET RDLC Reports.