barcode_type_page
UPC-A
Crystal
.NET
Florence, Italy]]>
UPC-A is one of the GS1 barcodes which have been used world widely in Logistics. The barcode symbology UPC-A is fixed-length and encodes twelve digits including one mandatory checksum digit.]]>
UPC-A Crystal Report Generator integrates with Crystal Report, and generates UPC-A barcodes in the report. With it, you are able to generate high quality UPC-A barcode images without the use of any barcode fonts. This document tells how to generate & print UPC-A barcodes in Crystal Reports.]]>
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]>
- Windows Vista
- Windows XP]]>
- C#, VB.NET, Managed C++, Borland Delphi for .NET
- Microsoft Visual Studio 2005/2008/2010]]>
BizCode Generator for Crystal Report and unzip;]]>
barcode_type_page
UPC-A
Crystal
.NET
protected void Page_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[])));
WebLinearBarcode barcode = new WebLinearBarcode ();
barcode. Symbology = Symbology.UPCA;
foreach (DataRow dr in ds.Tables[0].Rows)
{
barcode.Data = (int)dr["CustomerId"] + "";
byte[] imageData = barcode.drawBarcodeAsBytes();
dr["Barcode"] = imageData;
}
CrystalReportSource1.ReportDocument.Load(Server.MapPath
("CrystalReport1.rpt"));
CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]);
CrystalReportSource1.DataBind();
aConnection.Close();
}]]>
Protected Sub CrystalReportViewer1_Init(ByVal sender As Object,
ByVal e As System.EventArgs) Handles CrystalReportViewer1.Init
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 WebLinearBarcode ()
barcode. Symbology = Symbology.UPCA
For Each dr As DataRow In ds.Tables(0).Rows
barcode.Data = CInt(dr("CustomerId")) & ""
Dim imageData As Byte() = barcode.drawBarcodeAsBytes()
dr("Barcode") = imageData
Next
CrystalReportSource1.ReportDocument.Load(Server.MapPath
("CrystalReport1.rpt"))
CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables(0))
CrystalReportSource1.DataBind()
aConnection.Close()
End Sub
]]>