How to generate and print EAN 13 barcode in local reports (RDLC) in C#.NET or VB.NET projects
Avapose.Barcode Generator for RDLC
  • Create and print quality EAN 13 barcodes in client report definition (rdlc) files
  • Easily export RDLC report to PDF files or Excel with EAN 13 barcode in images
  • Reliable EAN 13 barcode generator component for .NET applications
EAN 13 Generation in Local Reports
  • Easy to insert barcode generation capability into Report Definition Language Client-Side report
  • Fully-integrated visual barcode control for .NET Framework 2.0, 3.0, 3.5 and above
  • Easy to be used in VB.NET, C#, Managed C++ and Borland Delphi for .NET
  • Create & save high-quality barcode images in files & the memory for Client RDLC report
  • Support 2 or 5 supplemental digits add-on generation of EAN 13 in local reports
  • Provide free trial package & optional C# or Visual Basic .NET sample codes
  • 100% compatible with Microsoft SQL Server 2005, 2008 or 2010
  • Checksum could be calculated and attached to the encoded data of some linear barcodes
.NET EAN 13 Barcode Control is a barcode component designed for automate EAN-13 barcode iamge handling in Local Reports (RDLC). It is a fully-integrated visual barcode designer which helps you build robust and customized reports using Visual Studio 2005, 2008 and 2010. Barcode height, width, X-dimension, margins properties could be modified by written C# or .NET codes.
.NET Barcode Control for RDLC - EAN 13 Information
EAN-13 is a linear, numeric-only barcode symbology which defined by the standards of GS1. It is an EAN-13 is a superset of UPC-A. EAN is Acronym of European Article Numbering. The EAN barcode was originally used by supermarkets for products identification. EAN 13 encodes 13 digits in which include one check digit.
EAN 13 Barcode Generator for Client RDLC report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
.NET Barcode SDK for Client-side Reporting - EAN 13 Generation


This part specifies the requirements before using .NET Control for RDLC:
  • Windows XP, Windows Vista and Windows 7
  • Microsoft Visual Studio 2005, 2008 or 2010
  • Microsoft SQL Server 2005, 2008 or 2010
  • .NET Framework 2.0, 3.0, 3.5, and advanced version
  • Avapose.Barcode for RDLC

Create RDLC Report Project in Visual Studio

  1. Download Avapose.Barcode for RDLC and unzip it;
  2. Start Visual Studio and create Windows Application project with name "RDLCBarcodeDemo".
  3. Create a new DataSet and entitle it as "AdventureWorks.xsd".
  4. Swith to "Pointer" and display the toolbox, and then drag and drop "TableAdapter" to your created DataSet.
  5. Create a connection to the AdventureWorks SQL Server Database sample and click Next. Then Choose "Use SQL statements" and click Next.
  6. Enter the following SQL Statement "SELECT ProductID, Name FROM Production.vProductAndDescription WHERE (CultureID = N'en')" and click Finish button.

Create Barcode Images in RDLC Report Project

  1. Add a new custom column in the DataTable name it "Barcode". Move to the Properties panel and change data type of "Barcode" column to "System.Byte[]" by manually typing it. Then save the "AdventureWorks.xsd".
  2. Create a new report and name it "Report1.rdlc".
  3. Drag and drop a Table from the "Report Items" to report and add 3 columns in DataSet "AdventureWorks.xsd" to the report table.
  4. Drag and drop an Image item to the "Barcode" column and setting the properties of image: Set "MIMEType" to "image/jpeg" , "Source" to "Database" and "Value" to "=Fields!Barcode.Value" . Then save the report.
  5. Open the Windows Forms and insert Report Viewer control on the form then choose your created report "Report1.rdlc"
  6. Copy the VB or C# .NET sample code below into the method Form1_Load, and then run the Windows application.

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.Ean13;
// 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.Ean13
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-13 Barcode Integration & Generation Information
The following EAN-13 barcode integration and creation information links relate to this product that may be of interest to you:
Testimonial for Barcode Generation SDK for RDLC
We bought your product Barcode Fonts a few weeks ago, and it works pretty well!
Carios Louis, Eureka Software Ltd, UK