Data Matrix – GS1

ReportBuilder 22+ introduced the GS1 property which adds the FNC1 character automatically.  The article below applies to ReportBuilder 21- or if manual encoding is desired.

ReportBuilder provides the tools necessary for the developer to support GS1 Data Matrix.

There are two options for ASCII encoding of the Data Matrix component (TppDataMatrixSettings.EncodeType property): ASCII and ASCIIManual.

ASCII automatically encodes extended characters (any character with a value above 127).  ASCIIManual allows for manual encoding by adding Data Matrix codewords directly (without them auto-encoded as extended ASCII characters).

For instance, with ASCII encoding, #232 encodes to the è character.  With ASCIIManual encoding, #232 is the Data Matrix codeword for FNC1.

For GS1, ASCIIManual encoding is needed to add the FNC1 character (#232) to the start of the data string.

uses
  ppTypes;

  pp2DBarcode1.DataMatrixSettings.EncodeType := etdmASCIIManual;
  pp2DBarcode1.Data := #232 + ‘01034531200000111719112510ABCD1234’;

For more information about GS1 Datamatrix encoding, see the following document (encoding section p. 14).
https://www.gs1.org/docs/barcodes/GS1_DataMatrix_Guideline.pdf

For more information about the individual Data Matrix codewords, see the Encoding section of the Wikipedia site.
https://en.wikipedia.org/wiki/Data_Matrix