Generating UPC-E Barcodes Crystal Report for .NET
Avapose.Barcode for Crystal Report
  • Cystal Report for .NET barcode creation SDK
  • VB.NET, C#, Managed C++ and Borland Delphi for .NET 2.0/3.0/4.0
  • High-quality linear & 2D barcode generation for all scanners
Barcode Crystal Report > Barcode in Crystal Report > Linear > .NET UPC-E in Crystal Report
UPC-E Barcode Generator for Crystal Report
  • Embed UPC-E generation capability to your Crystal Reports
  • Support Crystal Report in Windows and ASP.NET
  • Easy to install with X-copy deployment
  • Include strong named and digitally signed assemblies
  • Totally developed by managed code in C#
  • Automatically compute the check digit with high accuracy
  • Allow to print 2 and 5 digits supplement barcode symbol
  • Offer free technical support and royalty free license
UPC-E Barcode Generator for Crystal Report is a .NET SDK developed for Crystal Reports programming. The generator could be integrated into C#.NET or VB.NET IDEs, and its features could be inserted into Crystal Reports, thus you can print UPC-E barcode image in reports without troubles.
UPC-E Barcode Generator for Crystal Report - UPC-E Information
UPC-E is the 8-digit format of UPC barcodes that is used by the GS1 organization in applications in shipping and packing industries. It is one of the EAN/UPC Symbology representing a GTIN-12 in six explicitly encoded digits using zero-suppression techniques.
UPC-E Barcode Generator for Crystal Report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
  • 8 digits only including UPC-E number system and the checksum digit
UPC-E Barcode Generator for Crystal Report - UPC-E Generation

Environment Requirement

Before generating UPC-E 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 UPC-E 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");
aConnection.Open();
OleDbDataAdapter dataAdapter = new OleDbDataAdapter("select * from Customer"
, aConnection);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
//add a new column named "Barcode" to the DataSet, the new column data type is
byte[]

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

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
Source=C:/Demo/BarcodeDemoData.mdb"
)
aConnection.Open()
Dim dataAdapter As New OleDbDataAdapter("select * from Customer", aConnection)
Dim ds As New DataSet()
dataAdapter.Fill(ds)
'add a new column named "Barcode" to the DataSet, the new column data type is
byte[]

ds.Tables(0).Columns.Add(New DataColumn("Barcode", GetType(Byte())))
Dim Barcode As new Linear()
Barcode. LinearBarcode = LinearBarcode. UPCE
For Each dr As DataRow In ds.Tables(0).Rows
Barcode.BarcodeData = CInt(dr("CustomerId")) & ""
Dim imageData As Byte() = Barcode.drawBarcodeAsBytes()
dr("Barcode") = imageData
Next
Dim rpt As New CrystalReport1()
rpt.SetDataSource(ds)
Me.CrystalReportViewer1.ReportSource = rpt
aConnection.Close()
End Sub
Related UPC-E Barcode Integration & Generation Information
The following UPC-E 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.