How to create, print GS1-128 in Eclipse BIRT reports?
Using BIRT Barcode Generator plugin to generate GS1-128 in Eclipse BIRT reports
In this page, we will explain how to generate, embed, print, customize, view GS1 128 barcodes within Eclipse BIRT (Business Intelligence and Reporting Tools) reports. GS1 128 (also known as UCC/EAN 128, EAN 128, or simply GS1 128) is an application standard of the GS1 implementation that uses the Code 128 barcode specification. It enables the encoding of additional data such as best before dates, batch numbers, quantities, weights, and many other attributes through a series of Application Identifiers (AIs). Former names for this symbology include UCC 128 and EAN 128, though those terms are no longer in official use.
The BarcodeLib BIRT GS1 128 Generator is an Eclipse BIRT Custom Extended Report Item built on the BarcodeLib Java Barcode Generator library. It enables you to generate high quality GS1 128 barcode images directly in BIRT reports without writing Java code. All GS1 128 property settings are configured in the Report Item Property view of your Report Design file (.rptdesign). The plugin supports the full GS1 128 specification, including automatic insertion of the FNC1 function character, mandatory MOD 103 check digit, and AI (Application Identifier) data formatting. The plugin is distributed as a single JAR file, requires no registration key or activation code, and is easy to redistribute.
BIRT Barcode GS1 128 / EAN 128 Generator Introduction
The BarcodeLib BIRT Barcode GS1 128 Generator is an Eclipse BIRT Custom Extended Report Item that allows you to easily generate and print high quality linear (1D) and two dimensional (2D) barcodes in your BIRT reports. The GS1 128 component specifically targets the GS1 128 symbology, which is widely used in supply chain, logistics, healthcare, and retail for encoding standardized product information with Application Identifiers.
Valid data scope for GS1 128 encoding:
- All 128 ASCII characters (A - Z, a - z, 0 - 9, punctuation, control characters).
- Extended ASCII characters (values 128 - 255) in accordance with ISO 8859 1. These are referred to as extended ASCII and include accented letters and special symbols.
How to Generate EAN 128 / GS1 128 in a BIRT Report
This section provides a step by step guide to generating and printing GS1 128 barcodes in a BIRT report.
- Create a new empty report in your BIRT report barcoding project
- Open the Palette view and add the barcode report item
Locate the Palette view (usually on the right side of the IDE). Under the "Report Items" section, you should see an item named Barcode (or BarcodeLib.Barcode). Drag and drop this item onto your report layout.
-
Edit the barcode parameters
Right click the barcode item you have added and select Properties from the context menu. This opens the General tab, where you will find all barcode properties.
- For static text data, enclose the value in double quotation marks (e.g., "(00)350123451234567894").
- For data set expressions, do not use quotes; instead, enter an expression such as row["GS1_DATA"].
- Change the barcode type to GS1 128 / EAN 128
In the General tab, locate the Barcode Type property. Change it from the default to GS1-128 or EAN-128 (the exact label depends on the plugin version).
- Preview the report
Click the Preview button (or View Report) on the toolbar. A GS1 128 barcode image should be printed on your BIRT report.
GS1 128 Barcode Basic Characteristics
This section describes the fundamental characteristics of GS1 128 barcodes, including the encodable character set, automatic structural characters, and the mandatory check digit. Understanding these characteristics is essential for correctly formatting data and avoiding encoding errors.
Encodable Character Set
GS1 128 uses a subset of the ISO/IEC 646 character set as defined in GS1 specifications. The supported characters include:
- All 128 ASCII characters (values 0 - 127), including digits, uppercase and lowercase letters, punctuation, and control characters.
- ASCII characters from 128 to 255 (extended ASCII) in accordance with ISO 8859 1. These include accented letters and special symbols.
- Four function characters: FNC1, FNC2, FNC3, FNC4. Among these, FNC2 and FNC4 are NOT used in standard GS1 128. FNC1 is the most important because it indicates the start of GS1 formatted data.
- Four code set selection characters (CODE A, CODE B, CODE C, and SHIFT) that allow the barcode to switch between different character sets for optimal density.
- Three start characters (Start A, Start B, Start C). The barcode plug-in automatically selects the appropriate one based on the data.
- One stop character that marks the end of the barcode.
Note: All structural characters (function characters, code set selectors, start characters, stop characters) are added automatically by the BIRT barcode library. You only need to provide valid GS1 AI data in the Data property, formatted with parentheses around each AI. For example: "(01)12345678901234(17)250101(10)ABC123". The library inserts the FNC1 character at the beginning and manages code set switching internally.
GS1 128 Check Digit Character
GS1 128 uses the same mandatory MOD 103 check digit as standard Code 128. The check digit is calculated based on the encoded data (including the FNC1 character and all data characters) and is appended before the stop character.
- The check digit is not displayed in the human readable interpretation (HRI). Only the AI formatted data appears in the HRI.
- The AddCheckSum property (present for some other barcode types) is not applicable for GS1 128. You cannot disable the check digit; it is always added automatically.
- The BIRT Report barcode library automatically calculates and inserts the MOD 103 check digit. No manual configuration or calculation is required.
Note
Because the check digit is mandatory and automatic, you do not need to perform any additional steps. However, if you are generating barcodes from data that already includes a check digit codeword (e.g., from an external system), you must remove it before passing the data to the library. The library expects raw AI formatted data without any appended check digit.
GS1 128 Barcode Dimension Size Settings
All size values are configured in the Report Item Property view, aligned with your Master Page rules. The following properties are available:
- UOM (Unit of Measure) : Choose PIXEL, CM, or INCH. This ensures consistency with the report's layout units.
- X : Width of the narrow bar module. The minimum value is defined by your application standards and the output medium. For screen display, 2 - 4 pixels is typical. For high quality printing, 0.01 inch (0.254 mm) is a common minimum.
- Y : Height of the bar module. Taller barcodes are easier to scan. A typical value for screen display is 50 - 100 pixels; for printing, 0.5 inch is common.
- LeftMargin and RightMargin : Quiet zone margins on the left and right sides of the barcode. The minimum recommended quiet zone width is 10X (ten times the narrow bar width). For example, if X = 2 pixels, set margins to at least 20 pixels.
- TopMargin and BottomMargin : Vertical margins above and below the barcode. These are less critical but should be at least 2X to avoid clipping.
- Resolution : Image resolution in DPI. For printed reports, 300 DPI is recommended. For HTML output, 96 DPI is sufficient.
- Rotate : Rotates the barcode image by 0, 90, 180, or 270 degrees. Useful for fitting barcodes into narrow vertical spaces.
Note
Insufficient quiet zones are a leading cause of scanning failures. The GS1 specification requires a minimum quiet zone of 10 modules for GS1 128. Always set LeftMargin and RightMargin to at least 10X. If the barcode is placed near the edge of a label or report page, ensure that no other report items intrude into the quiet zone.
Summary
This comprehensive guide has provided a complete, step by step workflow for generating GS1 128 (EAN 128) barcodes in BIRT reports for Eclipse Java projects. All GS1 128 properties are configured in the Report Item Property view of the barcode report item, ensuring consistency and ease of management across your BIRT reports.
Using the BarcodeLib GS1 128 BIRT Generator, you can customize GS1 128 encoding, dimensions, and display properties to meet your BIRT report's specific requirements, whether for supply chain labels, healthcare tracking, or retail compliance.