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

Intelligent Mail

Short Description

The Intelligent Mail (IM) code is a 65-bar code for use on mail in the United States. This bar code is intended to provide greater information and functionality than its predecessors POSTNET and PLANET.

The Intelligent Mail bar code has also been referred to as One Code Solution and 4-State Customer bar code abbreviated 4CB, 4-CB or USPS4CB.

barcode-intelligent-mail

Bar Code Properties

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

The following properties are specific to the Intelligent Mail type.

Examples

The following code creates an Intelligent Mail 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 CreateIntelligentMailBarCode(string BarCodeText) {
    // Create a bar code control.
    XRBarCode barCode = new XRBarCode();

    // Set the bar code's type to Intelligent Mail.
    barCode.Symbology = new IntelligentMailGenerator();

    // Adjust the bar code's main properties.
    barCode.Text = BarCodeText;
    barCode.ShowText = true;
    barCode.WidthF = 300f;
    barCode.HeightF = 50f;

    // If the AutoModule property is set to false, uncomment the next line.
    barCode.AutoModule = true;
    //barcode.Module = 3;

    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(CreateIntelligentMailBarCode("4408200000012345678991203"));
}