EAN 8

Short Description

EAN-8 is the EAN equivalent of UPC-E in the sense that it provides a "short" bar code for small packages.

Barcode - EAN 8

Bar Code Properties

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

The are no properties specific to the EAN 8 bar code type.

Examples

The following code creates a EAN 8 bar code and specifies its main properties.

Imports System
Imports System.Collections.Generic
Imports System.Drawing.Printing
Imports System.Windows.Forms
Imports DevExpress.XtraPrinting.BarCode
Imports DevExpress.XtraReports.UI
' ...
Public Function CreateEAN8BarCode(ByVal BarCodeText As String) As XRBarCode
    ' Create a bar code control.
    Dim barCode As New XRBarCode()

    ' Set the bar code's type to EAN 8.
    barCode.Symbology = New EAN8Generator()

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

    Return barCode
End Function

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