A newer version of this page is available. Switch to the current version.

GS1- Data Matrix

  • 3 minutes to read

Short Description

The GS1 Data Matrix uses a special start combination to differentiate the GS1 DataMatrix symbol from other Data Matrix ECC 200 symbols. This is achieved by using the Function 1 Symbol Character (FNC1) in the first position of the encoded data. It enables scanners to process the information according to the GS1 System Rules.


Bar Code Properties

The type of a bar code control's Symbology property is DataMatrixGS1Generator.

The following properties are specific to the GS1 DataMatrix type.


The following code creates a GS1- Data Matrix bar code and specifies its main properties.

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

    // Set the bar code's type to Data Matrix GS1.
    barCode.Symbology = new DataMatrixGS1Generator();

    // Adjust the bar code's main properties.
    barCode.AutoModule = true;
    barCode.Text = BarCodeText;
    barCode.ShowText = true;
    barCode.Width = 200;
    barCode.Height = 200;

    // Adjust the properties specific to the bar code type.
    // (Assigned below are the default values.)
    ((DataMatrixGS1Generator)barCode.Symbology).FNC1Substitute = "#";
    ((DataMatrixGS1Generator)barCode.Symbology).HumanReadableText = true;
    ((DataMatrixGS1Generator)barCode.Symbology).MatrixSize = DataMatrixSize.MatrixAuto;

    return barCode;

To add the XRBarCode to a report band, handle the report's XRControl.BeforePrint event.

using System.Drawing.Printing;
// ...

private void XtraReport1_BeforePrint(object sender, PrintEventArgs e) {