How to generate UPC-A in Crystal Reports using Barcode Generation .NET SDK for Crystal Reports
Avapose.Barcode for Crystal Reports
  • Easily print UPC-A in Crystal Reports in ASP.NET and .NET WinForms
  • Generate high quality UPC-A barcode images in Crystal Reports
  • VB.NET, C#, Managed C++ and Borland Delphi for .NET 2.0/3.0/3.5/4.0
Barcode Crystal Report > Barcode in Crystal Report > Linear > .NET UPC-A in Crystal Report
Crystal Reports UPC-A Creator Component
  • Create UPC-A & UPC-A two or five digit add-on easily in the Crystal Report
  • Robust control & dll that stay embedded on Crystal Report
  • Rotate created UPC-A barcode images in 0, 90, 180 and 270 degrees
  • Easy to build powerful reporting solution using Visual Studio 2005, 2008, and 2010
  • Completely integrated into VB.NET, C#, Managed C++ and Borland Delphi for .NET
  • Change field to barcode in Crystal Report by simple clicks
  • Provide free trial package & optional VB, C# sample codes
  • Fully written in Visual C#.NET 2005
Avapose.Barcode for Crystal Report class library is designed to automate barcode image generation in crystal report. This advanced barcode control provides C# & Visual Basic source code and perpetual license in purchased version. Professional Crystal Report with barcode images could be exported in PDF, Word, Excel and rich text formats.
.NET Barcode Generation SDK for Crystal Report - UPC-A Information
UPC stands for Universal Product Code. UPC-A is a numeric only, linear barcode that widely used in Point-of-Sale. Usually it encodes 12 digits including 1 check digit. A two or five-digit Add-On Symbol may be used in specific applications to accompany an EAN-13, UPC-A, or UPC-E barcode symbol.
UPC-A barcode generator control for Crystal Report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
.NET Barcode Control for Crystal Report - UPC-A Generation

Requirements:

Before using UPC-A barcode control for Crystal Report, make sure you install:
  • Operating Systems: Windows XP, Windows Vista and Windows 7
  • Microsoft Visual Studio: 2005, 2008 and 2010
  • .NET Framework: 2.0, 3.0, 3.5, and advanced version
  • Avapose.Barcode for .NET Winforms

Implement UPC-A .NET Barcode Generation DLL for Crystal Report into Visual Studio

  1. Download Avapose.Barcode for .NET Winforms and unzip;
  2. Open Crystal Reports project in Visual Studio, and then choose "Standard" in the window titled "Using the Report Wizard" and click "OK".
  3. Expand "Create New Connection" and "ADO.NET" in the popped up "Data" form. Select "next" button. This brings up the "Connection" form. Navigate to the "CustomerDataSet.xsd" in the downloaded package and click "Finish" button.
  4. On the next "Data" form, add table "Customer" as selected tables and click "Next". In following "Fields" tab, double click all three fields available and move them to right "Customer" fields, and Click "Finish".
  5. In CrystalReport1.rpt, drag and drop field "Barcode" to the report Section 3 (Details).
  6. Switch to .NET project solution explorer, and then add "OnBarcode.Barcode.WinForms.dll" to your project reference.

Create UPC-A Barcodes Using .NET Barcode Control for Crystal Report

  1. Open your Form1.cs in Design view, and then double click the form to enter Form1.cs.
  2. Copy the VB.NET or C# programming codes below into the method Form1_Load and using the namespace "Avapose.linearbarcode".
  3. Run the report. Barcode images will be displayed on the Reporting Service.
  4. Crystal Report with barcode images could be exported as PDF, Word, Excel or rich text formats.

C# code

private void 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.Upca;
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. Upca
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-A Barcode Integration & Generation Information
The following UPC-A 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 Barcode Generator for Crystal Report a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.