Our Customers
EAN-13 Crystal Reports Barcode Generator DLL How to Generate EAN-13 Linear Barcode Images on .NET Crystal Reports
Fully written in Visual C# 2005, complying with Visual Studio 2005/2008/2010 Easy to install Crystal Reports EAN-13 Barcode Generator Control to VS .NET applications Quickly generate linear EAN-13 barcodes on Crystal Reports for ASP.NET web applications Create & draw EAN-13 barcode images on Crystal Reports for .NET windows applications Easy to use Visual C# & VB.NET class code to generate & make Crystal Reports EAN-13 barcodes Enable .NET developers to customize & control EAN-13 barcode image roperties Provide royalty-free several developer license types for EAN-13 .NET Crystal Reports Barcode Generator .NET Crystal Reports EAN-13 Linear Barcode Overview
EAN-13, based upon the UPC-A standard, was implemented by the International Article Numbering Association (EAN) in Europe. And it is a superset of UPC-A. An EAN-13 barcode is composed of four parts: 1) The number system, 2) The manufacturer code, 3) the product code, and 4) the check digit.
EAN-13 Barcode Standard Compatibility : All EAN-13 barcode images created by our .NET Crystal Reports Barcode Generator Library are complying wiht its latest barcode specifications, like GS1 Specification. And all of them can be read & scanned by almost barcode printers.
How to Create EAN-13 Barcode on Crystal Reports for ASP.NET Web
Create a new ASP.NET website.
Choose "ASP.NET Crystal Reports Web Site " as the template and named the project as "BarcodeforCrystalReportsWebSite". Add a new item "Crystal Report" to your project.
Add a new item "Crystal Report" to the project and name it as "CustomerReport.rpt ". view image Select "Mail Label " in the pop-up window and click "OK". view image In "Mailing Labels Report Creation Wizard", click "Create New Connection ", and expand "ADO.NET ". view image In "ADO.NET" form, choose "CustomerDataSet.xsd " file in your downloaded package, and click "Finish". view image In "Mailing Labels Report Creation Wizard", add table "Customer " under "ADO.NET" to selected table. And click "Next". view image Add all three fields "ID ", "CustomerId ", "CustomerName " to "Fields to Display:", then click "Next". view image Select default label "Return Address (Avery 5267) ", and click "Finish". Now you can view the report template and find that field "Barcode" not in the report template. view image Now, please re-arrange the report template. view image Drag field "Barcode " to the report template, right click "Barcode" object and choose "Format Object " menu. view image In "Format Editor" form, check "Can Grow " property. view image Drag a "Crystal Report Viewer" to the "Default.aspx".
Add a reference to BarcodeLib.Barcode.CrystalReports.dll . Copy the following C# code to the "Default.aspx.cs" file.
using System.Data.OleDb; using System.Drawing.Imaging; using BarcodeLib.Barcode.CrystalReports; using BarcodeLib.Barcode; protected void Page_Load(object sender, EventArgs e) { // Create the database connection. Please change to correct data file (BarcodeDemoData.mdb) path. OleDbConnection aConnection = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:/BarcodeLib_NETBarcode_Trial/ReportingData/BarcodeDemoData.mdb" ); aConnection.Open(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter("SELECT * FROM Customer" , aConnection); DataSet ds = new DataSet(); dataAdapter.Fill(ds); // Add the Barcode column to the DataSet ds.Tables[0].Columns.Add(new DataColumn("Barcode" , typeof (byte []))); // Create an instance of Linear Barcode LinearCrystal barcode = new LinearCrystal(); // Barcode settings barcode.Type = BarcodeType.EAN13; barcode.BarHeight = 50; //50 pixel barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png; foreach (DataRow dr in ds.Tables[0].Rows) { barcode.Data = (int )dr["CustomerId" ] + "" ; barcode.Data = "512345678900" ; byte [] imageData = barcode.drawBarcodeAsBytes(); dr["Barcode" ] = imageData; } CrystalReportSource1.ReportDocument.Load(Server.MapPath("CustomerReport.rpt")); CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]); CrystalReportSource1.DataBind(); }
4. Run your project.
How to Create EAN-13 Barcode on Crystal Reports for .NET Windows Forms
Create a new Windows Application Project.
Choose "Crystal Reports Application " as the template and name it as "BarcodeforCrystalReports ". Add a "Crystal Report" item to the project. Click to see how to add Crystal Report to project Drag a "Crystal Report Viewer" to the window form.
Resize "Form1" and drag "CrystalReportViewer" to the form, with the default setting unchanged. view image Add a reference to BarcodeLib.Barcode.CrystalReports.dll . Copy the following C# code to the "Form1.cs" file.
using System.Data.OleDb; using System.Drawing.Imaging; using BarcodeLib.Barcode.CrystalReports; using BarcodeLib.Barcode; private void Form1_Load(object sender, EventArgs e) { // Create the database connection. Please change to correct data file (BarcodeDemoData.mdb) path . OleDbConnection aConnection = new OleDbConnection( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:/BarcodeLib_NETBarcode_Trial/ReportingData/BarcodeDemoData.mdb" );aConnection.Open(); OleDbDataAdapter dataAdapter = new OleDbDataAdapter("SELECT * FROM Customer" , aConnection); DataSet ds = new DataSet(); dataAdapter.Fill(ds); // Add the Barcode column to the DataSet ds.Tables[0].Columns.Add(new DataColumn("Barcode" , typeof (byte []))); // Create an instance of Linear Barcode LinearCrystal barcode = new LinearCrystal(); // Barcode settings barcode.Type = BarcodeType.EAN13; barcode.BarHeight = 50; //50 pixel barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png; foreach (DataRow dr in ds.Tables[0].Rows) { barcode.Data = (int )dr["CustomerId" ] + "" ; barcode.Data = "512345678900" ; byte [] imageData = barcode.drawBarcodeAsBytes(); dr["Barcode" ] = imageData; } CustomerReport rpt = new CustomerReport(); rpt.SetDataSource(ds); this .crystalReportViewer1.ReportSource = rpt; //close the connection Its important. aConnection.Close(); }
4. Run your project.
How to Use C# or VB Class Library to Create EAN-13 Barcode on Crystal Reports
BarcodeLib.com provides how to pages for Craystal Reports Linear & 2D Barcodes Generatoion uisng Visual C# or Visual Basic, please see as below:
Crystal Reports Barcode Generator DLL for .NET Supported Barcodes
Linear (1D) Barcodes:
Codabar
Code 2 of 5
Code 11
Code 39
Code 93
Code 128
EAN 8
EAN 13
EAN 128/GS1 128
Interleaved 2 of 5
ITF14
MSI Plessey
Onecode
Planet
Postnet
RM4SCC
UPC-A
UPC-E
Matrix(2D) Barcodes :
QR Code
PDF417
Data Matrix
Crystal Reports Barcode Library for .NET - How to Create Linear Barcode Images:
Codabar ,
Code 11 ,
Code 2 of 5 ,
Code 39 ,
Code 93 ,
Code 128 ,
EAN-8 ,
EAN-13 ,
EAN 128/GS1 128 ,
Interleaved 2 of 5 ,
ITF14 ,
MSI Plessey ,
Intelligent Mail (Onecode) ,
PLANET ,
POSTNET ,
RM4SCC ,
UPC-A ,
UPC-E .
Crystal Reports Barcode Library for .NET - How to Create 2D Barcode Images:
Data Matrix ,
PDF417 ,
QR Code .
More Tutorial: Barcode Generating & Printing
.NET Crystal Reports Barcoding in ASP.NET & WinForms; Using C# or VB.NET
Related Barcode Creating & Encoding Tutorials:
Provides High Quality .NET Barcode Lib , WinForms Barcode Lib , ASP.NET Barcode Lib , C# Barcode Lib , VB.NET Barcode Lib , .NET EAN-13 Lib , ASP.NET EAN-13 Lib , Windows Forms EAN-13 Lib , C# EAN-13 Lib , VB.NET EAN-13 Lib , SSRS EAN-13 Lib, Crystal Reports EAN-13 Lib , RDLC Reports EAN-13 Lib.