Skip to main content


  • 3 minutes to read

UPC-E is a shorter version of UPC-A. It omits the number system digit, leading zeros in the manufacturer code, and trailing zeros in the product code. UPC-E is used on products with small packaging where a full UPC-A barcode does not fit.

The UPC-E1 is a type of UPC-E code with the number system set to 1. In the human-readable barcode string, the first digit is the number system (always 1 for this code type), and the last digit is the check digit of the original UPC-A code.

Barcode - UPC-E1

In the above example, the original UPC-A code is 14210000526. This code (without the number system) is transformed into 425261, the checksum digit (1) is calculated automatically. The number system, the code, and the checksum digit are encoded in a format scanners can read.


You should assign a code to the barcode’s Text property without the number system, since this digit is generated automatically. If it is not possible to convert a 10-digit code to a six-digit code, the barcode displays the “Invalid text format” error, and the digits to the right of the 10-th digit in the code are ignored.

Refer to the following article for more information: UPC-E.

Add the Bar Code to a Report

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

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

  3. Specify common barcode properties.

Runtime Example

The following code creates the UPC-E1 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 CreateUPCE1BarCode(string BarCodeText) {
    // Create a barcode control.
    XRBarCode barCode = new XRBarCode();

    // Set the barcode's type to UPC-E1.
    barCode.Symbology = new UPCE1Generator();

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

    return barCode;

The code example below shows how to create a report with the UPC-E1 barcode:

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

var barCode = CreateUPCE1BarCode("4210000526");

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