How to insert and print Royal Mail 4-State barcode for RDLC in ASP.NET or Windows Forms projects
Avapose.Barcode Generator for RDLC
  • Easily export RDLC report to PDF files or Excel with RM4SCC barcode in images
  • Create and print quality RM4SCC barcodes in client report definition (rdlc) files
  • Reliable RM4SCC barcode generator component for .NET applications
Royal Mail 4-State Barcode Creation in RDLC
  • Easily generate RM4SCC barcodes in RDLC report files
  • Easy setup process, no registration key, no activation code needed
  • Completely develop in .NET Framework 2.0 or greater
  • Managed code 100% created in Visual C#.NET with strong-named and signed DLLs
  • SQL Server 2005 and 2008 support with Adventure Works sample database installed
  • Easy to control the generated RM4SCC image size, rotation, resolution, color and other properties via VB.NET and C#
  • Display RM4SCC in image files as well as in the memory for RDLC reports
  • Royalty-free and perpetual developer license with C# and VB.NET source code
Avapose RM4SCC Generator for RDLC is a robust and reliable .NET barcode control that is capable of inserting high-quality RM4SCC images into RDLC reports. Completely developed in C#, this control is compatible with VB.NET, Managed C++, and Borland Delphi for .NET. Source code for VB.NET or C# is available with purchase of developer license.
Barcode Generation for RDLC Report Files - RM4SCC Information
RM4SCC (The Royal Mail 4-state Customer Code) is a height-modulated barcode symbology used by the Royal Mail for its Cleanmail service to automate mail sorting processes. Each RM4SCC consists of a start character, the postcode, the DPS, a checksum character and a stop character. Each RM4SCC character is composed of four bars, of which two are ascenders and two descenders.
.NET RM4SCC Library for RDLC encodes:
  • Numeric characters: 0-9
  • Upper case letters: A-Z
Barcode Generation for RDLC - RM4SCC Generation


To create RM4SCC in RDLC, you should install:
  • Windows XP, Windows Vista, Windows 7,etc
  • .NET 2.0, 3.0, 3.5, 4.0
  • Microsoft Visual Studio (any version)
  • Microsoft SQL Server 2005 (any version) or greater with Adventure Works sample database installed
  • Avapose.Barcode for RDLC

RM4SCC 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 RM4SCC images displayed on the report.

C# code

private void Form1_Load(object sender, EventArgs e)
// load data to the data table this.vProductAndDescriptionTableAdapter.Fill
// create a linear barcode object
Linear barcode = new Linear();
// set barcode type
barcode.LinearBarcode = LinearBarcode.Rm4scc;
// 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();

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.
Dim barcode As New Linear()
barcode.LinearBarcode = LinearBarcode. Rm4scc
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()
End Sub
Related Royal Mail Barcode Integration & Generation Information
The following Royal Mail 4-State Customer Code 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