corelibraries-devexpress-dot-xtraprinting-dot-barcode-24b9991f.md
A class used to generate an SSCC bar code.
Namespace : DevExpress.XtraPrinting.BarCode
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
public class SSCCGenerator :
EAN128Generator
Public Class SSCCGenerator
Inherits EAN128Generator
For information on the SSCC bar code type, review the following help topic: SSCC Bar Code.
Use the XRBarCode.Text property to specify a string composed of 17 digits in the following order:
Extension Digit1 digitGS1 Company Prefix7 digitsSerial Reference9 digits
The application identifier (AI) and Check Digit are generated automatically.
The following code creates the GS1-128 - EAN-128 (UCC) bar code 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 CreateSSCCBarCode(string BarCodeText) {
// Create a barcode control.
XRBarCode barCode = new XRBarCode();
// Set the barcode type to SSCC.
barCode.Symbology = new SSCCGenerator();
// Adjust the barcode's main properties.
barCode.Text = BarCodeText;
barCode.Width = 400;
barCode.Height = 100;
barCode.AutoModule = true;
return barCode;
}
Imports System
Imports System.Collections.Generic
Imports System.Drawing.Printing
Imports System.Windows.Forms
Imports DevExpress.XtraPrinting.BarCode
Imports DevExpress.XtraReports.UI
' ...
Public Function CreateSSCCBarCode(ByVal BarCodeText As String) As XRBarCode
' Create a barcode control.
Dim barCode As New XRBarCode()
' Set the barcode's type to EAN 128.
barCode.Symbology = New SSCCGenerator()
' Adjust the barcode's main properties.
barCode.Text = BarCodeText
barCode.Width = 400
barCode.Height = 100
barCode.AutoModule = True
Return barCode
End Function
Object DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase BarCodeGeneratorBase Code128Generator EAN128Generator SSCCGenerator
See Also