BizCode Barcode Generator for Crystal Report
The most advanced barcode control for Crystal Report
Quick Overviews
  • Crystal Report .NET SDK
  • Linear & 2D barcode support
  • .NET 2.0/3.0/4.0 support
  • Support C#, VB.NET, etc.
  • Multiple file formats support
How to Generate Code 39 in Crystal Reports
Code 39 (also known as Alpha39, Code 3 of 9, Type 39) is a variable length, discrete and self-checking barcode symbology that widely used in many industries. It is the standard for many government barcode specifications including U.S. Department of Defense and health care product industry.
Barcode Generator SDK for Crystal Report is a robust and easy-to-use .NET component that completely runs in .NET 2.0, 3.0, 3.5, 4.0 to create major linear and 2D barcodes in Crystal Report with high quality.
Code 39 Generator SDK for Crystal Report is a reliable barcode generator that capable of generating Code 39 and Extended Code 39 in Crystal Report. Developers are easy to customize Code 39 parameters such as rotation, resolution, and size through VB.NET and C#.
The generated Code 39 in Crystal Report can be easily and freely saved into high-quality Gif, Tiff, Bmp, Png or Jpeg image. And it is compatible with ISO / IEC 16388 (2nd edition 2007-05-15). This page gives you a detail explanation of how to create Code 39 in Crystal Report programs with Barcode Generator for Crystal Report.
Code 39 Generator for Crystal Report Features
Encodable Characters Support to encode:
- Numeric data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- Uppercase letters: A - Z
- Seven special characters: -, $, :, /, ., +
Extended Code 39 Support Support Extended Code 39 generation that capable of encoding Standard ASCII characters 0-127 (default: ISO/IEC 646)
.NET Technology -Completely run in VB.NET and C#
-Managed code 100% created in C#
-Strong-named and signed DLLs
-support .NET 2.0, 3.0 and advanced version
Flexible Sizing Options It is easy to adjust X dimension, wide to narrow nation, Y dimension and other properties of Code 39
Checksum Flexibility You can enable or disable checksum for Code 39. If enabled checksum, Barcode Generator calculates check digit for you automatically
High Quality Draw high quality Gif, Tiff, or Png images or graphic objects in Crystal Report compatible with all printers
Code 39 Generator for Crystal Report Requirements
Windows OS
- Microsoft Windows 7
- Windows Server 2008
- Windows Vista
- Windows Server 2003
- Windows XP
Development Environments
- .NET 2.0/3.0/4.0
- C#, VB.NET, Managed C++, Borland Delphi for.NET
- Visual Studio 2005/2008/2010
- Crystal Report (Runtime)
Install Code 39 Generator for Crystal Report
  1. Download Barcode Generator for Crystal Report Free Trial and unzip;
  2. Add "BusinessRefinery.Barcode.web.dll" to your ASP.NET project reference;
How to Insert Code 39 into Crystal Report
  1. Download Barcode Generator for Crystal Report and unzip. In the demo file, there are a "BarcodeDemoData.mdb" that including "ID", "CustomerId", and "CustomerName", and a "CustomerDataSet.xsd".
  2. Open your Visual Studio, create a new web project with "ASP.NET Crystal Reports Web Site" as template;
  3. Create a new report "Using the Report Wizard", and choose "Standard", and click "OK";
  4. In "Data" form, double click "Create New Connection", and expand "ADO.NET".
  5. In "ADO.NET" form, select "CustomerDataSet.xsd" file in your downloaded package, and click "Finish" button.
  6. Back at the "Data" form. Double click "table", then click "Next". In the "Fields" form, double click or drag and drop "ID", "CustomerID", "CustomerName" to "Fields to Display" and click "Finish";
  7. In CrystalReport1.rpt, add field "Barcode" to the report Section 3;
  8. Add "BusinessRefinery.Barcode.web.dll" to your project reference in "Solution Explorer";
  9. Right click "Default.aspx" in "Solution Explorer" and choose "View Code";
  10. Copy the following code accordingly and run the project.
Sample Coding of Generating Code 39 in Crystal Report
Run the Web Project:
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[])));
Linear barcode = new Linear();
barcode.Type = BarcodeType.CODE39;
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 Linear()
barcode.Type = BarcodeType.CODE39
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