How to print Code 2 of 5 Interleaved in Crystal Reports for .NET using .NET Barcode SDK for CR Reports
Avapose.Barcode for Crystal Reports
  • Reliable Interleaved 2 of 5 barcode creator library & DLL for Crystal Report .NET
  • Easily print Interleaved 2 of 5 in Crystal Reports in ASP.NET and .NET WinForms
  • Generate high quality Interleaved 2 of 5 barcode images in Crystal Reports
Barcode Crystal Report > Barcode in Crystal Report > Linear > .NET Interleaved 2 of 5 in Crystal Report
Interleaved 2 of 5 Barcode Creation in Crystal Report
  • Add Interleaved 2 of 5 barcode images easily into Crystal Report applications
  • Create high quality barcode in accordance with ISO/IEC 16390
  • Perform well in .NET Framework 2.0, 3.0, 3.5, and greater
  • Support VB.NET, C#, Managed C++ and Borland Delphi for .NET
  • Completely written in C#.NET 2005
  • Generate & print barcode images in PNG, BMP, GIF, JPEG, TIFF image formats
  • Change fields in Crystal Report into barcode images by simple clicks
  • Provide flexible licenses include royalty free & perpetual developer licenses
Avapose.Barcode for Crystal Report is an advanced & mature solution that could be easily integrated for barcode automation purpose in Crystal Report. Once installed, this .NET component could stay embedded on Crystal Report. Properties of created Interleaved 2 of 5 include height, width, X-dimension, wide/narrow ratio, margins, resolution etc. are highly customizable.
.NET Barcode Control for Crystal Report - Interleaved 2 of 5 Information
Interleaved 2 of 5 is a numeric and bidirectional decodable linear barcode symbology. Interleaved 2 of 5 could encode variable length of digits with an optional check digit. The Interleaved 2 of 5 indicates that data is encoded as interleaved pairs of symbol characters, the first of which comprises two wide and three narrow bars while the second of which comprises two wide and three narrow spaces.
Interleaved 2 of 5 BarcodeControl for Crystal Report encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
.NET Barcode Control for Crystal Report - Interleaved 2 of 5 Generation

Requirements:

Before using Interleaved 2 of 5 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 Crystal Report

Integrate Interleaved 2 of 5 .NET Barcode Control for Crystal Report into Visual Studio

  1. Open Crystal Reports project in Visual Studio, and then choose "Standard" in the "Using the Report Wizard" window and click "OK".
  2. Expand "Create New Connection" and "ADO.NET" in the popped up "Data" form. After click "next" button, you could see the "Connection" form. Navigate to the "CustomerDataSet.xsd" in the downloaded package and click "Finish" button.
  3. Add table "Customer" as selected tables in the "Data" form and click "Next". In following "Fields" form, add all three columns available to "Customer" fields, and Click "Finish".
  4. In CrystalReport1.rpt, drag and drop field "Barcode" to the report Section 3 (Details).
  5. Switch to .NET project solution explorer, and then add "OnBarcode.Barcode.WinForms.dll" to your project reference.
  6. Copy the sample code below into the method Form1_Load and using the namespace "Avapose.linearbarcode".
  7. Run the report. Barcode images will be displayed on the Reporting Service.
  8. Crystal Report with barcode images could be exported as PDF, Word, Excel or rich text formats.

  1. a

  1. a

C# code

class="kwrd">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.INTERLEAVED_25;
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.INTERLEAVED_25
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 Interleaved 2 of 5 Barcode Integration & Generation Information
The following Interleaved 2 of 5 barcode integration and creation information links relate to this product that may be of interest to you:
Testimonial for Barcode Generation SDK for .NET
We bought your product Barcode Generator for Crystal Report a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.