Skip to main content
All docs
V24.1

GS1 QR Code

  • 3 minutes to read

GS1 QR Code is a variant of the QR Code symbology that conforms to GS1 General Specification.

GS1 Qr Code Bar Code

Add a Bar Code to a Report

  1. Drag the XRBarCode item from the DX.24.1: Report Controls tab and drop it onto the report.

    Add the XBarCode item to the Report

  2. Set the XRBarCode control’s Symbology property to QRCodeGS1 (an object of the QRCodeGS1Generator type).

    Specify the Symbology for the Barcode

  3. Specify common barcode properties and properties specific to GS1 QR Code.

Specific Properties

AutoModule
Gets or sets whether the Module property value should be calculated automatically based on the barcode size.
CompactionMode
Gets or sets whether numeric, alphanumeric or byte mode should be used to encode the barcode’s data.
ErrorCorrectionLevel
Gets or sets the amount of redundancy built into the bar code’s coding, to compensate for calculation errors.
Version
Gets or sets the bar code’s size.
IncludeQuietZone
Gets or sets whether to add a blank space around the QR code.
Logo
Specifies the image that overlays the QR code.
FNC1Substitute
Specifies the symbol (or set of symbols) in the bar code’s text that will be replaced with the FNC1 functional character when the bar code’s bars are drawn.
FrameOptions
Gets or sets the frame for QR codes.

Runtime Example

The following code creates a GS1 QR Code barcode and specifies its properties:

View Example: How to Add a Bar Code to a Report

using System;
using System.Collections.Generic;
using System.Drawing.Printing;
using System.Windows.Forms;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
// ...
public XRBarCode CreateQRCodeGS1BarCode(string BarCodeText) {
    // Create a barcode control.
    XRBarCode barCode = new XRBarCode();

    // Set the barcode's type to QRCode.
    barCode.Symbology = new QRCodeGS1Generator();

    // Adjust the barcode's main properties.
    barCode.Text = BarCodeText;
    barCode.Width = 400;
    barCode.Height = 150;

    // If the AutoModule property is set to false, uncomment the next line.
    barCode.AutoModule = true;
    // barcode.Module = 3;

    // Adjust the properties specific to the barcode type.
    ((QRCodeGS1Generator)barCode.Symbology).CompactionMode = QRCodeCompactionMode.AlphaNumeric;
    ((QRCodeGS1Generator)barCode.Symbology).FNC1Substitute = "#";
    ((QRCodeGS1Generator)barCode.Symbology).ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.H;
    ((QRCodeGS1Generator)barCode.Symbology).Version = QRCodeVersion.AutoVersion;

    return barCode;
}

The code example below shows how to create a report with a GS1 QR Code barcode:

using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
//...

var barCode = CreateQRCodeGS1BarCode("0123456789");

var report = new XtraReport() {
    Bands = {
        new DetailBand() {
            Controls = { barCode }
        }
    }
};