The requested page is not available for the requested platform. You are viewing the content for Default platform.

Code 11 (USD-8)

Short Description

Code 11, also known as USD-8, was developed as a high-density numerical-only symbology. It is used primarily in labeling telecommunications equipment.

The symbology is discrete and is able to encode the numbers 0 through to 9, the dash symbol (-), and start/stop characters.

Barcode - Code 11

Bar Code Properties

The type of a bar code control's Symbology property is Code11Generator.

The are no properties specific to the Code 11 bar code type.

Examples

The following code creates a Code 11 (USD-8) 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 CreateCode11BarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to Code 11.
    barCode.Symbology = new Code11Generator();

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

    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(CreateCode11BarCode("012345678"));
}