Introduction of QR Code RDLC Barcode Generator
QR Code Barcode Generator for RDLC is a sophisticated QR Code generator developed for generating QR Code in RDLC reports for .NET. The generator is a easy-to-install control library. Once integrated into the report, QR Code could be drawn easily. The parameters of the QR Code are customizable by using C# or VB coding.
Except for QR Code, there are more than 40 types of linear and 2D barcode images are supported by OnBarcoode.com Barcode Library for .NET RDLC Local Report.
- Linear Barcodes on RDLC Report: QR Code, Code 128, EAN-8, EAN-13, GS1 128, UPC-A, UPC-E, Interleaved 2 of 5, Postal Codes, etc
- 2D Barcodes on RDLC Report: including QR Code, Data Matrix, PDF-417
How to create, print QR Code in RDLC report in C# ASP.NET, WinForms application?
OnBarcode provides step-by-step tutorials about print barcode in RDLC report in C# ASP.NET, Windows Forms application.
In the above tutorials, you will create and print Code 128 barcodes in RDLC reports. Here we will update the demo codes to print QR Codes in RDLC reports.
Open file
Open file
Form1.cs in the Visual Studio
- Comment out the existing
Linearobject construction code - Create a new
QRCodeobjec to create, customize QR Codes in RDLC report
// Linear linear = new Linear(); QRCode barcode = new QRCode();
How to print QR Code with specified size in RDLC reports?
Here we will learn how to print barcodes with specified image width and height in RDLC local report files in C# ASP.NET, WinForms applications.
Here we will use our prepared WinForms tutorial to demonstrate. You can view the detailed tutorial here: How to create, print barcode in RDLC reports in C# Windows Forms application?
In the following step-by-step instructions, we will generate and print of QR Code with 3cm side length in RDLC reports in C# WinForms (.NET Framework) project.
Here we will use our prepared WinForms tutorial to demonstrate. You can view the detailed tutorial here: How to create, print barcode in RDLC reports in C# Windows Forms application?
In the following step-by-step instructions, we will generate and print of QR Code with 3cm side length in RDLC reports in C# WinForms (.NET Framework) project.
1. QR Code image resolution and size settings
Open file
Add the following C# codes in the method
Add the C# source code below to create QR Code with gray background color. It is easy for us the measure the printed QR Code size in the RDLC reports.
Form1.cs in the Visual Studio 2022
Add the following C# codes in the method
Form1_Load
- Create a new
QRCodeobject - Change the QR Code unit of measure to
CM - Set the QR Code image resolution to
300 ppi. High resolution image will improve the printed QR Code image quality. - Set the QR Code image side size to 3cm
QRCode barcode = new QRCode(); barcode.UOM = UnitOfMeasure.CM; barcode.Resolution = 300; barcode.BarcodeWidth = 3.0f;
Add the C# source code below to create QR Code with gray background color. It is easy for us the measure the printed QR Code size in the RDLC reports.
barcode.AutoResizePaddingTransparent = false; barcode.BackColor = Color.Gray;
2. Update the barcode image object in the RDLC report designer
Open file
Select the barcode image item in the report designer, and update the following properties values.
Right click barcode image item, and choose Image Properties....
Go to tab Size, choose Fit to size, click button OK
Report1.rdlc in design mode in Visual Studio
Select the barcode image item in the report designer, and update the following properties values.
- Set
Widthto3cm - Set
Heightto3cm
Right click barcode image item, and choose Image Properties....
Go to tab Size, choose Fit to size, click button OK
3. View, measure the QR Code size in RDLC report
Run the Windows Forms project, and view the barcodes printed in the report in the Windows Form.
View and measure the printed QR Codes in PDF exported from RDLC report.
The QR Code in the PDF file size is 1.18 inch (3.00 cm).
View and measure the printed QR Codes in PDF exported from RDLC report.
The QR Code in the PDF file size is 1.18 inch (3.00 cm).
How to encode text in QR Code in RDLC report?
Encode text to QR Code is really an easy job. Enter the encoding text to property
Data in C# program.
The QR Code RDLC library will convert the encoding text to QR Code in RDLC reports.
barcode.Data = "ASCII chars here";
Encode QR Code with Unicode text
To convert Unicode text to QR Code image, you need enable property
EncodeUnicodeText to true. The RDLC QR Code library
will automatically convert, encode Unicode text in property Data to QR Code in RDLC report.
barcode.EncodeUnicodeText = true; barcode.Data = "Unicode text here";
Encode QR Code with GS1 text message
To generate GS1 standard QR Code, you need set property
FNC1 with value FNC1.FNC1_1ST_POS. And enter the GS1 defined data format text
to property Data.
barcode.FNC1 = FNC1.FNC1_1ST_POS; barcode.Data = "GS1 text message here";
How to print QR Code with colors and image settings applied in reports?
Print QR Code with styled colors
Using RDLC QR Code Generator library, you can easily create, customize QR Code with colors in RDLC report in C# ASP.NET, WinForms application.
With the above C# codes applied, you can view the QR Codes with red bar modules printed in the RDLC report.
- Customize QR Code bar modules' colors through property
ForeColor - Customize QR Code space modules' colors (background color) through property
BackColor
barcode.ForeColor = Color.Red; barcode.BackColor = Color.White;
With the above C# codes applied, you can view the QR Codes with red bar modules printed in the RDLC report.
High resolution QR Code images for printing
High resolution QR Code image will improve the printing quality. You can apply the QR Code image resolution setting through property
You can view the QR Code image with 300 dpi in PDF file from RDLC report in 800% zoom view using Acrobat.
Resolution using
RDLC QR Code Barcode library.
barcode.Resolution = 300;
You can view the QR Code image with 300 dpi in PDF file from RDLC report in 800% zoom view using Acrobat.
QR Code Advanced Options in RDLC reports
QR Code ISO standard and GS1 standard define the following options
- QR Code Data Mode
- Error Correction Level (ECL)
- QR Code Versions
- FNC1
Common Asked Questions
What does QR stand for in code?
QR stands for "quick response", and QR Code is a 2-dimensional matrix barcode. The QR Code stores data information both horizontally and vertically.
The QR Code is designed for high speed reading barcode.
OnBarcode RDLC QR Code Generator library supports QR Code generation in Visual Studio RDLC report designer, and preview QR Codes in report viewer in WinForms, ASP.NET Core projects.
What is the maximum data in a QR code?
A standard QR Code can store up to three kilobytes (KB) of data.
A QR Code symbol with version 40-L can hold the following maximum data characters:
- numeric data: 7,089 characters
- alphanumeric data: 4,296 characters
- byte data: 2,953 characters
- Kanji data: 1,817 characters
What is the smallest I can make a QR code in RDLC reports?
The recommended smallest size of QR Code is 2 x 2 cm, and they will be scanned and read by cameras from smartphones (iOS or Android).
If the generated QR Code is for QR Code scanners, the minimum size for a QR Code is 1 x 1 cm.
Using .NET RDLC QR Code Generator library, you can create and customize the printed QR Code dimension size in RDLC report designer in Visual Studio .NET.
Using .NET RDLC QR Code Generator library, you can create and customize the printed QR Code dimension size in RDLC report designer in Visual Studio .NET.
Does the color of a QR Code matter?
Choose whatever colors you want but always make sure the fore (bar) module and back (space) moduel colors have high contrast.
We suggest at least 70% darker to ensure reliable camera scanning, and always scan and test your QR code using the camera in your smartphone.
You can customize the QR Code bar and space colors in RDLC report designer using Visual Studio .NET IDE.
You can customize the QR Code bar and space colors in RDLC report designer using Visual Studio .NET IDE.
How to create a QR Code for a picture?
To create a QR code from a photo or an image in RDLC reports
- Convert the photo image raw data into byte array, and store in the database
- Create, insert a QR Code barcode item in RDLC report designer
- Set the QR Code data mode as byte
- Print and output QR Code in the RDLC report. You can preview the report in report viewer.
What is the difference between a barcode and a QR Code?
Barcode is usually known as 1d or linear barcode symbology, which can store limited number of characters.
QR Code or Quick Response Code, is a type of two-dimensional code, which will store characters horizontally and vertically, and a QR Code can hold more than 4,200 alphanumeric characters.
Using OnBarcode RDLC Barcode Generator library, you can create, insert QR Code (standard, GS1, Micro, Macro versions) and other 20+ 2d, 1d barcodes such as Code 128, Data Matrix, EAN/UPC barcodes in RDLC report designer and view QR Code and barcodes in report viewer using Visual Studio .NET.
Using OnBarcode RDLC Barcode Generator library, you can create, insert QR Code (standard, GS1, Micro, Macro versions) and other 20+ 2d, 1d barcodes such as Code 128, Data Matrix, EAN/UPC barcodes in RDLC report designer and view QR Code and barcodes in report viewer using Visual Studio .NET.
