Skip to main content
A newer version of this page is available. .

UPC Supplemental 2

  • 2 minutes to read

Short Description

2-digit supplemental bar codes should only be used with magazines, newspapers and other periodicals.

The 2-digit supplement represents the issue number of the magazine. This is useful so that the product code itself (contained in the main bar code) is constant for the magazine, so that each issue of the magazine doesn’t have to have its own unique bar code. Nevertheless, the 2-digit supplement can be used to track which issue of the magazine is being sold, for example, for sales analysis or restocking purposes.

Barcode - UPC Supplemental 2

Bar Code Properties

The type of a bar code control’s Symbology property is UPCSupplemental2Generator.

The are no properties specific to the UPC Supplemental 2 bar code type.

Examples

The following code creates a UPC Supplemental 2 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 CreateUPCSupplemental2BarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to UPC Supplemental 2.
    barCode.Symbology = new UPCSupplemental2Generator();

    // Adjust the bar code's main properties.
    barCode.Text = BarCodeText;
    barCode.Width = 100;
    barCode.Height = 55;

    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) {
    this.Detail.Controls.Add(CreateUPCSupplemental2BarCode("012345678"));
}