Guide for EAN-13 Creation in Crystal Reports

Generate EAN-13 Barcode for Crystal Reports with C# and VB Class
  • Seamlessly integrated into Visual Studio 2005, 2008 and 2010
  • Support popular languages (C#.NET and VB.NET) for EAN-13 encoding in Crystal Reports
  • Easy to create EAN-13 Two or Five Digit Add-On in Crystal Reports project
  • Create customized reporting solution which takes user input in a reliable manner
  • Append or disable the checksum digit for EAN-13 barcode in the human readable text
  • Support various EAN-13 barcode image formats, including Gif, Jpeg, Bmp, Png and Tiff
  • Draw EAN-13 symbol in high & low resolution by setting "DPI" parameter
Crystal Reports EAN-13 Barcode Library Overview
With KA.Barcode for Crystal Reports, .NET programmers could create a reporting solution with barcoding features and customize each report before printing it. High quality EAN-13 barcode images could be maintained when exporting Crystal Reports into PDF, Word, Excel and rich text formats.
EAN-13 Barcode Overview
As one member of EAN / UPC family, EAN-13 is also widely used in the point-of-sale systems. EAN-13 could encode 13 digits in which one check digit is included to enhance data security.
EAN-13 Valid Character Set
  • Numeric Data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Crystal Reports EAN-13 Barcode SDK Download
This EAN-13 Barcode Generation SDK for Crystal Reports Evaluation is costless and developers can download it online at any time. After you download and unzip the evaluation version, you will find:
  • KeepAutomation.Barcode.Crystal.dll
  • KACrystalData.mdb
  • ProductDataSet.xsd
  • End User License Agreement
  • User Manual and Order Page
Developers are allowed to use this evaluation version of Crystal Reports EAN-13 Barcode SDK permanently. EAN-13 barcode images generated with this evaluation version may contain a "KA Barcode" watermark. As a result, usage of this evaluation version is limited to demo purpose.
Crystal Reports EAN-13 Barcode Creation in ASP.NET
  1. Open your Visual Studio and create a new web project with "ASP.NET Crystal Reports Web Site" as template.
  2. Create a new report "Using the Report Wizard", choose "Standard", and click "OK".
  3. In "Data" form, double click "Create New Connection", and expand "ADO.NET".
  4. Add "ProductDataSet.xsd" file in "ADO.NET" form, and click "Finish" button.
  5. In "Data" form, add table "Product" and click "Next". In "Fields" form, add all three columns in the table "Product" and click "Finish".
  6. Add field "Barcode" to the report Section 3 in CrystalReport1.rpt.
  7. Locate "KeepAutomation.Barcode.Crystal.dll" to your project reference.
  8. Compile the sample codes below and run the project.
C# Sample code
     protected void Page_Load(object sender, EventArgs e)
{
OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/KACrystalData.mdb");
aConnection.Open();

OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Product",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[])));

BarCode ean13 = new BarCode();
//Barcode settings
ean13.Symbology = KeepAutomation.Barcode.Symbology.EAN13;
ean13.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;

foreach (DataRow dr in ds.Tables[0].Rows)
{
ean13.CodeToEncode = (int)dr["ProductId"] + "";
byte[] imageData = ean13.generateBarcodeToByteArray();
dr["Barcode"] = imageData;
}
CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt"));
CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]);
CrystalReportSource1.DataBind();

}
VB Sample code
     Protected Sub Page_Load(sender As Object, e As EventArgs)
Dim aConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/KACrystalData.mdb")
aConnection.Open()

Dim dataAdapter As New OleDbDataAdapter("select * from Product", aConnection)
Dim ds As New DataSet()
dataAdapter.Fill(ds)

'Add the Barcode column to the DataSet
ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte())))

Dim ean13 As New BarCode()
'Barcode settings
ean13.Symbology = KeepAutomation.Barcode.Symbology.EAN13
ean13.ImageFormat = System.Drawing.Imaging.ImageFormat.Png

For Each dr As DataRow In ds.Tables(0).Rows
ean13.CodeToEncode = CInt(dr("ProductId")) & ""
Dim imageData As Byte() = ean13.generateBarcodeToByteArray()
dr("Barcode") = imageData
Next
CrystalReportSource1.ReportDocument.Load(Server.MapPath("CrystalReport1.rpt"))
CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables(0))
CrystalReportSource1.DataBind()

End Sub
This Crystal Reports Barcode Generation Guide in WinForms will tell you how to create standard EAN-13 barcode image in WinForms with this Crystal Reports Barcode DLL.
EAN-13 Barcode Properties
Free Trial DownloadCrystal EAN-13EAN-13 PropertiesUsing C#Using VB.NETUsing ASP.NETUsing .NET WinformsData Matrix for Crystal ReportPDF417 for Crystal ReportQR Code for Crystal ReportmoreCodabar for Crystal ReportCode 39 for Crystal ReportCode 128 for Crystal ReportEAN-8 for Crystal ReportEAN 128 for Crystal ReportIntelligent Mail for Crystal ReportInterleaved 2 of 5 for Crystal ReportISBN for Crystal ReportITF-14 for Crystal ReportRM4SCC for Crystal ReportUPC-A for Crystal ReportUPC-E for Crystal Reportmore
KeepAutomation provides complete barcode automation solutions for add barcode display 2-dimensional, barcode generation capacity api, and barcode mobile applications. We recommend the customers use high quality document controls: ASP.NET Document Viewer, ASP.NET MVC Document Viewer, Document Viewer ASP.NET C#, ASP.NET PDF Viewer, ASP.NET Word Viewer, ASP.NET Excel Viewer, ASP.NET PDF Editor, MVC PDF Viewer, ASP.NET Annotate PDF, c# pdf sdk, C# merge PDF files, Split PDF in C#, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from RasterEdge.com.