How to generate and print GS1-128 (UCC/EAN-128) barcode in rdlc reports in C# or VB.NET projects
Avapose.Barcode Writer SDK for RDLC
  • Reliable GS1-128 barcode generator component for .NET applications
  • Create and print quality GS1-128 barcodes in client report definition (rdlc) files
  • Easily export RDLC report to PDF files or Excel with GS1-128 barcode in images
GS1-128 Creation in Local Reports RDLC
  • Generate GS1-128 iamges in Client Report Definition (.rdlc) Files
  • Insert GS1-128 barcode generation features into local RDLC reports
  • Implement reliable & mature GS1-128 generation in Client RDLC reports
  • Support Visual C#.NET and VB.NET IDEs
  • Include intelligent solution for Application Identifier (AI encoding
  • The generated GS1-128 is compatible with specified GS1 barcode standards
  • Capable to rotate and align the barcode symbol in RDLC reports
  • Offer royalty free distribution license
GS1-128 Barcode Generator Control for RDLC is a functional .NET SDK for RDLC report programming. The SDK could be used to insert dynamic GS1-128 barcode images into Client RDLC reports. .NET 2.0 or greater is supported.
GS1-128 Barcode Generator for RDLC - GS1-128 Information
GS1-128 is a variable length barcode symbology used by the GS1 organization in shipping and packaging industries. Comparing to other GS1 barcodes, GS1-128 tends to identify the container and pallet levels in the supply chain.
GS1-128 Barcode Generator Control for Client RDLC report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • Uppercase letters (A - Z)
  • Lowercase letters (a - z)
  • - (Dash), $ (Dollar), % (Percentage), (Space), . (Point), / (Slash), + (Plus)
GS1-128 Barcode Generator for RDLC - GS1-128 Generation

Environment Requirement

Before generating GS1-128 in .NET, you need to install:
  • Windows 7, Windows Vista, or Windows XP
  • .NET 2.0, 3.0 or later version
  • Microsoft Visual Studio 2005/2008/2010
  • Avapose.Barcode for RDLC

Creating a RDLC Report in .NET

  1. Open your Visual Studio and create a new Windows Forms;
  2. Create a new DataSet, name the dataset "AdventureWorks.xsd", and add it to the form;
  3. Select "Pointer", then drag &drop "TableAdapter" to your created Dataset;
  4. Create a new connection or use an existing connection to SQL Server AdventureWorks Sample Database;
  5. Input "SELECT ProductID, Name FROM Production.vProducrAndDescription WHERE (CultureID =N’en’) as SQL statements;"

Inserting Dataset and Table

  1. Right-click "vProductAndDescription" on the DataSet to create a new column in the DataTable, and name the column as "Barcode";
  2. Activate the Properties Window, and manually input "System.Byte[]" to the data type of the column;
  3. Switch to the Solution Explorer, and create a new report named "Report1.rdlc";
  4. Activate the "Toolbox", then insert a Table to the report;

Adding Fields

  1. Add three columns in the DataSet to the report table detail section, and drag an image item to the last column "Barcode";
  2. Set image item property "Source" to "Database";
  3. Set image item property "MIMEType"to "image/jpeg";
  4. Set image item property "Value" to "=Fields!Barcode.Value";

Integrating GS1-128 Generator into RDLC Report

  1. Select "Form1.cs[Design], and drag "ReportViewer" to Form1;
  2. Choose your report, and bind data collection;
  3. Copy the C# or VB .NET sample code into the method Form1_Load;
  4. Switch to the Solution Explorer, and add the generator DLL to project reference;
  5. Use "Avapose.linearbarcode" namespace;
  6. Run the Windows Forms.

C# code

private void Form1_Load(object sender, EventArgs e)
// load data to the data table this.vProductAndDescriptionTableAdapter.Fill
// create a linear barcode object
Linear barcode = new Linear();
// set barcode type
barcode.LinearBarcode = LinearBarcode.EAN128;
// draw barcodes for each data row
foreach (AdventureWorks.vProductAndDescriptionRow
row in this.AdventureWorks.vProductAndDescription.Rows)
{// set barcode encoding data value
barcode.Data = row.ProductID.ToString();
// set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Jpeg;
row.Barcode = barcode.drawBarcodeAsBytes();

VB code

Private Sub Form1_Load(ByVal sender 
As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code
loads data into the 'AdventureWorks.vProductAndDescription' table.
You can move, or remove it, as needed.
Dim barcode As New Linear()
barcode.LinearBarcode = LinearBarcode.EAN128
Dim row As AdventureWorks.vProductAndDescriptionRow
For Each row In Me.AdventureWorks.vProductAndDescription.Rows
' set barcode encoding data value
barcode.Data = row.ProductID.ToString()
' set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Png
row.Barcode = barcode.drawBarcodeAsBytes()
End Sub
Related EAN/UCC-128 Barcode Integration & Generation Information
The following GS1-128 (EAN/UCC128) barcode integration and creation information links relate to this product that may be of interest to you:
Testimonial for RDLC Barcode Generator
We bought your product Barcode Generator for RDLC reports a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.