How to Generate EAN-13 in RDLC Reports
EAN-13 is the standard version of EAN (European Article Number) barcodes, which is used with consumer products internationally. It is used by GS1 for GTIN-13 encoding.
Barcode Generator for RDLC is a compact and robust development tool that generates 20+ linear & 2D barcode in reports. It integrates with RDLC reports in client and server projects. The integrated generator draws high quality graphics object, no barcode font is needed.
EAN-13 RDLC Generator could be added into RDLC so that your report could generate EAN-13 barcodes. The generated EAN-13 is of high quality and highly customizable. EAN-13 with supplement barcode symbol is supported.
The EAN-13 barcodes generated by the integrated RDLC generator are customizable. The width and height of the barcode could be enlarge or compressed. The orientation of the symbol could be redefined.
EAN-13 Generator for RDLC Features
Valid Data |
Valid character set includes:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
Checksum Calculation |
Automatically calculate the mandatory checksum digit basing on your specified data string. |
Automatically calculate the mandatory checksum digit basing on your specified data string. |
Print possible two and five digits supplement barcode symbol for supplement information encoding. |
Size Adjustments |
Easy to set and adjust the size of modules in the symbol, margins around the symbol, and the entire image. |
Supplement Barcode |
Generate 2 or 5 digits supplement barcode to accompany EAN-13 |
Royalty-free Distribution |
Offer royalty-free license with purchase license. |
EAN-13 Generator for RDLC Requirements
Windows OS
- Windows 7 - Windows Vista - Windows XP |
Development Environments
- .NET 2.0, 3.0 or later version - C#, VB.NET, Managed C++, Borland Delphi for .NET - Microsoft Visual Studio 2005/2008/2010 |
How to add RDLC Barcode Generator DLL to RDLC Report
- Download Barcode Generator for RDLC and unzip it;
- Open Visual Studio, and create ASP.NET web form project;
- Add Barcode Generator DLL to the project reference;
- In Solution Explorer, right-click the "add new items" to add a class;
- Copy the C# or VB.NET sample code in the created class "APP_Code/Class1.cs";
Add EAN-13 into a RDLC Report in the Project
- Select "Build" to "build web site";
- In Solution Explorer, right-click the "add new items" to add a report;
- Go to "Report Items" in toolbox to drag and drop a Table into the Report;
- Switch to the "Website Data Source" to add "Name" and "Price" into the report table details section; and drag an image in the last column "Barcode";
- Select the image and navigate the properties to set data source "database", set image MIMEType "image/jpeg" and set value "=Fields!Bit.Value";
- Switch back to Solution Explorer, right-click "Default.aspx" and select "View Designer"
- Drag a "ReportViewer" in Data of toolbox to the project;
- Choose your created report "Report.rdlc" from "Choose Report" menu;
- Debug the webpage, generated barcodes appear in your report.
EAN-13 Generation in RDLC Sample Code
run the report, barcode images will be showed on the web page.
using System;
using System.Collections.Generic;
using BusinessRefinery.Barcode;
using BusinessRefinery.Barcode.RDLC;
public class Product
{
private string m_name;
private int m_price;
private byte[] m_bit;
public Product(string name, int price, string data)
{
m_name = name;
m_price = price;
WebLinearBarcode barcode = new WebLinearBarcode ();
barcode. Symbology = Symbology.EAN13;
barcode. Code = data;
m_bit = barcode.drawBarcodeAsBytes();
}
public byte[] Bit
{
get { return m_bit; }
}
public string Name
{
get
{
return m_name;
}
}
public int Price
{
get
{
return m_price;
}
}
}
public class Merchant
{
private List<Product> m_products;
public Merchant()
{
m_products = new List<Product>();
m_products.Add(new Product("000123456789", 25, "000123456789"));
m_products.Add(new Product("123456789000", 30, "123456789000"));
m_products.Add(new Product("001234567890", 15, "001234567890"));
}
public List<Product> GetProducts()
{
return m_products;
}
}
Imports System.Collections.Generic
Imports BusinessRefinery.Barcode
Imports BusinessRefinery.Barcode.RDLC
Public Class Product
Private m_name As String
Private m_price As Integer
Private m_bit As Byte()
Public Sub New(name As String, price As Integer, data As String)
m_name = name
m_price = price
Dim barcode As New WebLinearBarcode ()
barcode. Symbology = Symbology.EAN13
barcode. Code = data
m_bit = barcode.drawBarcodeAsBytes()
End Sub
Public ReadOnly Property Bit() As Byte()
Get
Return m_bit
End Get
End Property
Public ReadOnly Property Name() As String
Get
Return m_name
End Get
End Property
Public ReadOnly Property Price() As Integer
Get
Return m_price
End Get
End Property
End Class
Public Class Merchant
Private m_products As List(Of Product)
Public Sub New()
m_products = New List(Of Product)()
m_products.Add(New Product("000123456789", 25, "000123456789"))
m_products.Add(New Product("123456789000", 30, "123456789000"))
m_products.Add(New Product("001234567890", 15, "001234567890"))
End Sub
Public Function GetProducts() As List(Of Product)
Return m_products
End Function
End Class