How to generate, print Code 128 barcode in BIRT reports?

Generate barcode Code 128 images in BIRT Reports

BIRT Code 128 Generator to Generate Code-128 in BIRT Reports, Code-128 Barcode Generation

  • Easy to generate Code 128 barcodes in BIRT reports
  • Simple to redistribute BIRT Code 128 barcode library (jar)
  • No registration key or activation code required
  • Generating high quality Code 128 Bar Code images in GIF, PNG, JPG format
  • Flexible barcode settings to adjust size, image, rotation, font, etc
  • Completely developed in Eclipse BIRT Custom Extended Report Item framework.
  • Mature BIRT Code128 barcode generation plugin using Java Barcode Generator library

This page will guide you through generating Code 128 (a high-density linear barcode symbology) images in BIRT (Business Intelligence and Reporting Tools) reports within Eclipse Java projects. All Code 128 property settings are configured exclusively in the Report Item Property view of your Report Design (.rptdesign) file, ensuring consistency and ease of management across your enterprise BIRT reports.


How to create, print Code 128 barcodes in Eclipse BIRT reports?

  1. Download BIRT Code 128 Generator plugin
  2. Install BIRT barcode generation plugin jar file into BIRT report project
  3. Start to Create














Code 128 Barcode Data Characters Encoding in BIRT Reports

Code 128 supports a wide range of data characters and code sets, all configurable in the Report Item Property view of the Image Report Item. Let's break down the key encoding details and how to configure them in BIRT.


Code 128 Data Character Set

Code 128 barcode supports the following data characters, which you can configure directly in the Report Item Property view:
  • All 128 Full ASCII characters defined in ISO/IEC 646. This is the default character set and works for most standard text data in BIRT reports (e.g., product IDs, URLs).
  • Extended ASCII characters (values 128-255 of ISO/IEC 8859-1, Latin Alphabet 1) are supported using the Function Character (FNC4). You don't need to manually input FNC4. Enable the "SupportExtendedASCII" property in the Report Item Property view, and the library will automatically encode these characters.
  • 4 non-data function characters (FNC1-FNC4), which we'll cover in detail later.
  • 4 code set selection characters, used to switch between Code 128's three data code sets.
  • 3 Start characters (one for each code set), which initiate the barcode encoding.
  • 1 Stop character, which terminates the barcode and ensures proper scanning.



Code 128 Data Code Sets in BIRT

Code 128 barcode has three unique data code sets, each with a subset of ASCII characters and auxiliary characters. You can configure the code set in the Report Item Property view:
  • Code Set A: Supports ASCII characters 00-95 (control characters and uppercase letters) and special characters. Ideal for data that includes control characters (e.g., tabs, line feeds).
  • Code Set B: Supports ASCII characters 32-127 (printable characters, lowercase letters, uppercase letters, and symbols). Ideal for most standard text data in BIRT reports.
  • Code Set C: Supports numeric pairs (00-99), allowing efficient encoding of numeric data (each pair encodes two digits in a single codeword). Ideal for large numeric data (e.g., serial numbers, phone numbers).
Configuring code sets in BIRT is simple:
  • To let the library automatically select the best code set (recommended for most BIRT reports), set the "BarcodeType" property to "CODE128" in the Report Item Property view. The library will analyze the data and choose the most efficient code set.
  • To manually select a code set, set the "BarcodeType" property to:
    • "CODE128A" for Code Set A
    • "CODE128B" for Code Set B
    • "CODE128C" for Code Set C


Note: Manually selecting a code set that is incompatible with your data (e.g., Code Set C for non-numeric data) will cause encoding errors. Always use the "CODE128" auto-selection option if you're unsure about the data type.


Code 128 Function Characters (FNC) in BIRT

Function Characters (FNC) define instructions to barcode reading devices for special operations. You don't need to manually input FNC characters. Enable the appropriate property in the Report Item Property view, and the library will automatically encode them:
  • FNC1: Used for GS1 system data (GS1-128). Enable the "FNC1Enabled" property in the Report Item Property view to encode GS1 data (we'll cover this in detail later).
  • FNC2: Used for message append. Enable the "FNC2Enabled" property if you need to append multiple Code 128 barcodes into a single message.
  • FNC3: Instructs the barcode reader to interpret the data as instructions for initialization or reprogramming. Enable the "FNC3Enabled" property if your use case requires this functionality.
  • FNC4: Used to represent Extended ASCII characters (values 128 - 255). Enable the "SupportExtendedASCII" property (which automatically uses FNC4) to encode these characters.


Code 128 Check Digit in BIRT

Code 128 barcode requires a mandatory check digit (checksum) character, calculated using module 103 (mod 103). Here's how it works in BIRT:
  • The check digit is automatically calculated and added by the Code 128 library. You do not need to manually configure it.
  • The check digit is not displayed in the Human Readable Interpretation (HRI) and will not be returned by barcode decoders.
  • The "AddCheckSum" property (common in barcode libraries) is not applicable for Code 128. The library will always calculate and add the check digit before the Stop character, regardless of this property's setting.


Code 128 Barcode Human Readable Interpretation (HRI) in BIRT

The Human Readable Interpretation (HRI) is the text displayed alongside the Code 128 barcode (typically below or above it). It should be printed without violating the barcode's quiet zones, and you can configure its position and appearance in the Report Item Property view.


Render HRI Below the Code 128 Barcode

By default, most Code 128 libraries render the HRI below the barcode. To configure this in BIRT:
  • Select the Image Report Item and open the Report Item Property view.
  • Enable the "ShowHRI" property (set to "true"). This displays the HRI text.
  • Set the "HRIPosition" property to "Below" (this is the default setting for most libraries).
  • Configure HRI formatting (font, size, color) using the "HRIFont", "HRIFontSize", and "HRIFontColor" properties in the Report Item Property view.
  • Ensure the "BottomMargin" property is set to a sufficient value to avoid overlapping the HRI with other Report Items.



Code 128 Barcode Dimension Size in BIRT Reports

Customize the size and dimensions of your Code 128 barcodes in BIRT reports using the Report Item Property view. You can adjust module size, height, quiet zones, and unit of measure to ensure scannability. All aligned with BIRT's layout features.

The following Code 128 dimension settings are configurable in the Report Item Property view:
  • UOM (Unit of Measure): Select the unit for size settings (PIXEL, CM, or INCH). This ensures consistency with the report's Master Page settings.
  • X (Width of narrow element): The width of each Code 128 module. The minimum module width is defined by your application's specifications; smaller modules create smaller barcodes but may be harder to scan, especially in printed BIRT reports.
  • Y (Bar module height): The height of the Code 128 barcode. A minimum height of 10mm (or 40 PIXEL) is recommended for scannability.
  • Quiet Zones: Set "LeftMargin" and "RightMargin" to define the empty space around the Code 128. The minimum quiet zone width is 10X (10 times the narrow element width), as per Code 128 standards.
  • TopMargin/BottomMargin: Control the space above and below the barcode, especially important if the HRI is enabled.













Common Asked Questions

What is the barcode Code 128 text code?

Code 128 barcode is a high-density 1d barcode symbology, which encodes digits, letters, control characters, and full ASCII 128 characters. Using BIRT barcode generator plugin, you can easily encode, create, insert, customize and print Code 128 barcode images in BIRT report template in Exclipse BIRT IDE.

What is Code 128 barcode used for?

Code 128 barcode is a common linear barcode type used in:
  • Food and non-food industries
  • Shipping and packing industry
  • Health, public sector and government bodies
You can easily create, print standard Code 128 barcode images in Eclipse Report Designer using OnBarcode BIRT Barcode Generator plugin.

What is the check digit for code 128?

Code 128 barcode contains a mandatory check digit (checksum) character, which is based on module 103 (mod 103). Using BIRT barcode blugin, the generator software will automatically calculate the check character and insert into the Code 128 barcode in BIRT reports.

What is Code 128 barcode maximum length?

The Code 128 ISO standard does not define the maximum number of characters in a single Code 128 barcode.

However some Code 128 standards will provide the limits. GS1-128 has limits the maximum length of Code 128 data to 48 characters.

Using Eclipse BIRT Barcode plugin, you will encode and generate ISO standard Code 128 and application approved Code 128 barcodes, such as GS1-128 in BIRT Designer and BIRT Report Viewer.

How to scan, read Code 128 barcodes?

You can download and install OnBarcode free Code 128 barcode scanner software, or use barcode scanner device, or 3rd party apps installed on phone to read and scan the Code 128 barcodes. OnBarcode provides Java Barcode Reader library to scan, read Code 128 and other 2d, 1d barcodes in Java application.

Is Code 128 barcode better than Code 39?

Both Code 128 and Code 39 are popular linear barcode symbologies. Code 128 is more compact than Code 39, supporting more data to be encoded in a smaller space. BIRT Barcode Generator allows report application developers to encoding and printing both Code 128 and Code 39 in Eclipse BIRT report web and desktop applications.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.