How to generate and print Interleaved 2 of 5 barcode in RDLC reports in C#.NET or VB.NET projects
Avapose.Barcode Generator for RDLC
  • Reliable Interleaved 2of5 barcode generator component for .NET applications
  • Create and print quality Interleaved 2 of 5 barcode in RDLC report files
  • Export RDLC report to PDF files or Excel with Code 2 of 5 Interleaved images
Barcode RDLC > Barcode in RDLC > Linear > Interleaved 2 of 5
Interleaved 2 of 5 Barcode Creation in RDLC
  • Easily insert Interleaved 2 of 5 into RDLC report files
  • Quickly and perfectly export Interleaved 2 of 5 images to Acrobat PDF as well as Excel XLS
  • Barcodes generated in RDLC are high-quality Gif, Tiff, Bmp, Png or Jpeg graphic images
  • Easily and quickly change parameters via C# and VB.NET in RDLC report file
  • Can be used as strong-named and signed DLL without being loaded on a form
  • Managed code entirely created in C#
  • The generated Interleaved 2 of 5 is compatible with International standard ISO/IEC 16390
  • Royalty-free with purchase of the developer license
Interleaved 2 of 5 Barcode Component for RDLC is a robust and mature barcode generator to create Interleaved 2 of 5 and other linear and 2D barcodes in ReportViewer Local Reports (RDLC). The generated barcodes are high-quality Gif, Jpeg or Png image with high readability. Developers are flexible to change barcode parameters via VB.NET or C#.NET in RDLC report files.
Barcode Generation for RDLC Reports - Interleaved 2 of 5 Information
Interleaved 2 of 5 (ITF, i2of5) is a numeric only barcode used to encode pairs of numbers based upon the Industrial 2 of 5 symbology. It is a continuous non-fixed length barcode that widely used in wholesale and library to store the encoded data. A checksum character in Interleaved 2 of 5 is optional. Since Interleaved 2 of 5 must always have an even number of digits, when a check digit is added, the leftmost character may need to add a zero.
.NET Interleaved 2 of 5 Generator for RDLC encodes:
  • Digital characters : 0, 1, 2 ,3 ,4, 5, 6 ,7 ,8 ,9
Barcode Generation for RDLC - Interleaved 2 of 5 Generation

Requirements:

To generate Interleaved 2 of 5 in RDLC, you need to install:
  • Windows XP, Windows Vista, Windows 7,etc
  • .NET Framework 2.0, 3.0 or greater
  • Microsoft Visual Studio 2005 or greater
  • Microsoft SQL Server 2005 (any version) or greater with Adventure Works sample database installed
  • Avapose.Barcode for RDLC

Interleaved 2 of 5 Generation in RDLC in .NET WinForms Applications

  1. Open Visual Studio and create a new Windows Forms project naming "RDLC Barcode Demo ";
  2. Add a new "DataSet " to the project:
    • Create a new "DataSet " and name it "AdventureWork.xsd ";
    • Drag and drop "TableAdapter " to your created DataSet in toolbox;
    • Create a new connection or use existing connection to SQL Server AdventureWorks Sample Database;
    • Keep "Use SQL statements " to access the database and input "SELECT ProductID, Name FROM Production.vProductAndDescription WHERE (CultureID = N'en')" as SQL statements;
    • Right click "vProductAndDescription" on the DataSet to create a new column in the "DataTable " and name it "Barcode ";
    • In the "properties " window, change this barcode "DataType " to "System.Byte[]";
  3. Create a new report:
    • Create a new report and name "Report1.rdlc";
    • Drag and drop a "Table " onto the report;
    • Add three columns in DataSet "AdventureWorks.xsd" to the report table details section, and drag an "Image " to the last column "Barcode ";
    • In the "properties " window, set image item property "MIMEType" to "image/jpeg", "Source" to "Database" and "Value" to "=Fields!Barcode.Value";
  4. Drag "ReportViewer " control:
    • Drag a "ReportViewer " to "Form1.cs ";
    • Choose "Report1.rdlc" report, and click "Rebind Data Source ";
    • In the "Report.rdlc " page, click "Report ", and select "Data Source ";
    • Add "AdventureWorks_vProductAndDescription " to report data source;
  5. Add "Avapose.linearbarcode.winforms.dll " to .NET project reference from the "Solution Explorer ";
  6. Copy the following code accordingly into the method Form1_Load and run the project. You can get the Interleaved 2 of 5 images displayed on the report.

C# code

private void Form1_Load(object sender, EventArgs e)
{
// load data to the data table this.vProductAndDescriptionTableAdapter.Fill
(this.AdventureWorks.vProductAndDescription);
// create a linear barcode object
Linear barcode = new Linear();
// set barcode type
barcode.LinearBarcode = LinearBarcode.Interleaved2of5;
// draw barcodes for each data row
foreach (AdventureWorks.vProductAndDescriptionRow
row in this.AdventureWorks.vProductAndDescription.Rows)
{// set barcode encoding data value
barcode.Data = row.ProductID.ToString();
// set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Jpeg;
row.Barcode = barcode.drawBarcodeAsBytes();
}
this.reportViewer1.RefreshReport();
}

VB code

Private Sub Form1_Load(ByVal sender 
As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code
loads data into the 'AdventureWorks.vProductAndDescription' table.
You can move, or remove it, as needed.
Me.vProductAndDescriptionTableAdapter.Fill
(Me.AdventureWorks.vProductAndDescription)
Dim barcode As New Linear()
barcode.LinearBarcode = LinearBarcode.Interleaved2of5
Dim row As AdventureWorks.vProductAndDescriptionRow
For Each row In Me.AdventureWorks.vProductAndDescription.Rows
' set barcode encoding data value
barcode.Data = row.ProductID.ToString()
' set drawing barcode image format
barcode.Format = System.Drawing.Imaging.ImageFormat.Png
row.Barcode = barcode.drawBarcodeAsBytes()
Next
Me.ReportViewer1.RefreshReport()
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 Avapose.Barcode for RDLC
We bought your Barcode Generator for RDLC a few weeks ago, and it works pretty well
Carios Louis, Eureka Software Ltd,UK