How to generate and print USPS IMbarcode in local reports (RDLC) in C#.NET or VB.NET projects
Avapose.Barcode Generator for RDLC
  • Compatible with .NET Framework 2.0, 3.0, 3.5, 4.0
  • Create and print quality Intelligent Mail barcodes in RDLC reports
  • Reliable USPS postal barcode generator component for .NET applications
Barcode RDLC > Barcode in RDLC > Linear > Intelligent Mail
Intelligent Mail Generation in Local Reports
  • Insert & print high quality Intelligent Mail into Report Definition Language Client-Side report
  • Maintain barcode images on exported PDF and html
  • Easy-to-use barcode generation SDK & special barcode know-how is not required
  • Property options include customization of barcode height, width, X-dimension, margins
  • Build powerful client-side reporting project by using Microsoft Visual Studio 2005, 2008 or 2010
  • 100% managed code created in C#
  • Graphic configuration customizations include foreground and background colors
  • Fully integrated in .NET Framework 2.0, 3.0, 3.5 or above
Intelligent Mail .NET Barcode Generator helps you inserting barcode images easily into Report Definition Language Client-Side report. It supports languages such as VB.NET, C#, Managed C++ and Borland Delphi for .NET. Reasonable alternative text fonts, size, color are acceptable provided the interpretation is clearly legible.
.NET Barcode Control for RDLC - Intelligent Mail Information
Intelligent Mail barcode is also referred to as One Code Solution and 4-State Customer Barcode. It is a linear barcode which was employed in the USPS mail stream for tracking and sorting letters. Intelligent Mail barcode became essential element for the Postal Service in May 2011.
Intelligent Mail Barcode Generator for RDLC encodes:
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
.NET Barcode Control / SDK for RDLC - Intelligent Mail Creation

Requirements:

This part specifies the requirements before using .NET Generation SDK for RDLC:
  • Windows XP, Windows Vista and Windows 7
  • Microsoft Visual Studio 2005, 2008 or 2010
  • Microsoft SQL Server 2005, 2008 or 2010
  • .NET Framework 2.0, 3.0, 3.5, and advanced version
  • Avapose.Barcode for RDLC

Create RDLC Report Project in Visual Studio

  1. Open Visual Studio and create Windows Application project with name "RDLCBarcodeDemo".
  2. Create a new DataSet and entitle it as "AdventureWorks.xsd".
  3. Swith to "Pointer", and then drag and drop "TableAdapter" from Toolbox to your created DataSet.
  4. Create a connection to the AdventureWorks SQL Server Database sample and click Next. Then Choose "Use SQL statements" and click Next.
  5. Enter the following SQL Statement "SELECT ProductID, Name FROM Production.vProductAndDescription WHERE (CultureID = N'en')" and click Finish button.

Create Barcode Images in RDLC Report Project

  1. Add a new custom column in the DataTable name it "Barcode". Move to the Properties panel and change data type of "Barcode" column to "System.Byte[]" by manually typing it. Then save the "AdventureWorks.xsd".
  2. Create a new report and name it "Report1.rdlc".
  3. Drag and drop a Table from the "Report Items" to report and add 3 columns in DataSet "AdventureWorks.xsd" to the report table.
  4. Drag and drop an Image item to the "Barcode" column and setting the properties of image: Set "MIMEType" to "image/jpeg" , "Source" to "Database" and "Value" to "=Fields!Barcode.Value" . Then save the report.
  5. Open the Windows Forms and insert Report Viewer control on the form then choose your created report "Report1.rdlc"
  6. Copy the VB or C# .NET sample code below into the method Form1_Load, and then run the Windows application.

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.IntelligentMail;
// 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. IntelligentMail
Dim row As AdventureWorks.vProductAndDescriptionRow
Related USPS OneCode Barcode Integration & Generation Information
The following USPS OneCode barcode integration and creation information links relate to this product that may be of interest to you:
Testimonial for Barcode Generation SDK for RDLC
We bought your product Barcode Generator for RDLC a few weeks ago, and it works pretty well!
Carlos Louis, Eureka Software Ltd, UK.