How to insert EAN 13 in Crystal Reports for .NET using EAN13 .NET SDK for Crystal Reports
Avapose.Barcode for Crystal Reports
  • Reliable EAN13 barcode creator library & DLL for Crystal Report .NET
  • Easily print EAN13 in Crystal Reports in ASP.NET and .NET WinForms applications
  • Generate high quality EAN13 barcode images in Crystal Reports
Barcode Crystal Report > Barcode in Crystal Report > Linear > .NET EAN-13 in Crystal Report
EAN-13 Barcode Generator for Crystal Report
  • Insert EAN-13 barcode images into Crystal Reports for .NET projects
  • Draw quality graphics object on Crystal Reports for .NET
  • Implement EAN-13 barcode generation without the use of barcode font
  • Provide developer guide with complete sample code for C#.NET and VB.NET
  • Easy to install with X-copy deployment
  • Allows scaling, coloring, rotating, and more customization of the barcode
  • Compatible with EAN-13 linear barcode GS1 standards
  • Offers source code in Visual C# for additional request
EAN-13 Barcode Generator Control for Crystal Report is a .NET SDK developed for EAN-13 barcode generation in Crystal Reports for .NET applications. The barcode generator dll is used to print and display EAN-13 barcode image in crystal report objects which could be added into types of .NET projects.
EAN-13 Barcode Generator for Crystal Report - EAN-13 Information
EAN-13 is the standard format of European Article Number which was known as International Article Number. It is 13-digit and numeric. It is used with consumer products internationally especially for encoding GTIN-13 for GS1 applications.
EAN-13 is formerly known as European Article Number, but now renamed International Article Number while the abbreviation EAN has been retained. This linear barcode symbology is included in GS1 system and used worldwide for marking products at POS (point of sale).
EAN-13 Barcode Generator for Crystal Report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 13 digits only including the check digit
EAN-13 Barcode Generator for Crystal Report - EAN-13 Generation

Environment Requirement

Before generating EAN-13 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 with Crystal Report Wizard
  • Avapose.Barcode for Crystal Report

Creating a Crystal Report for .NET

  1. Open your Visual Studio and create a new project;
  2. Select the Crystal Report template for Visual C# or Visual Basic;
  3. Name and locate the report;
  4. When the Crystal Report Gallery dialog box appears, accept the defaults of "Use Report Expert" and "Standard Report", and click "OK";
  5. When Crystal Reports wizard dialogue pops up, expand "Create New Connection", and click "ADO.NET";
  6. Browse and find "CustomerDataSet.xsd" in your downloaded sample dataset package (or any other dataset of your own), then click "Finish";

Fields and Style Setting

  1. Click on the Tables node to expand;
  2. Drag and drop the table name to the window titled Tables In Report, and click "Next";
  3. To display fields on the report, select them at the Field tab, and click "Finish";
  4. Modify the form so that it can preview and print the report;

Integration of EAN-13 Barcode Generator for Crystal Report

  1. Drag and drop the field named "Barcode" to the report in Crystal Report1.rpt;
  2. Open Form1.cs in Design view, and add Avapose.linearbarcode.winforms.dll to the project reference;
  3. Double click Form1 to enter Form1.cs, and copy the sample code into the method Form_Load;
  4. Using the namespace "Avapose.linearbarcode" if your report is created in C#.NET;
  5. Run the report;

C# code

privatevoid Form1_Load(object sender, EventArgs e)
OleDbConnection aConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Demo/BarcodeDemoData.mdb");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Customer"
, aConnection);
DataSet ds = new DataSet();
//add a new column named "Barcode" to the DataSet, the new column data type is

ds.Tables[0].Columns.Add(new DataColumn("Barcode", typeof(byte[])));
Linear Barcode = new Linear();
Barcode. LinearBarcode = LinearBarcode.EAN13;
foreach (DataRow dr in ds.Tables[0].Rows)
Barcode.BarcodeData = (int)dr["CustomerId"] + "";
byte[] imageData = Barcode.drawBarcodeAsBytes();
dr["Barcode"] = imageData;
CrystalReport1 rpt = new CrystalReport1();
this.crystalReportViewer1.ReportSource = rpt;

VB code

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles MyBase.Load

Dim aConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Dim dataAdapter As New OleDbDataAdapter("select * from Customer", aConnection)
Dim ds As New DataSet()
'add a new column named "Barcode" to the DataSet, the new column data type is

ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte())))
Dim Barcode As new Linear()
Barcode. LinearBarcode = LinearBarcode.EAN13
For Each dr As DataRow In ds.Tables(0).Rows
Barcode.BarcodeData = CInt(dr("CustomerId")) & ""
Dim imageData As Byte() = Barcode.drawBarcodeAsBytes()
dr("Barcode") = imageData
Dim rpt As New CrystalReport1()
Me.CrystalReportViewer1.ReportSource = rpt
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:
Avapose.Barcode for Crystal Report Testimonial
We bought your product Crystal Report Barcode Generator a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.