Flexible and Comprehensive Barcode Generator for RDLC
Avapose.Barcode for RDLC
  • Professional barcode component for .NET 2.0/3.0/4.0
  • Visual Studio 2005/2008 ReportViewer Local Reports (RDLC)
  • Support linear, postal & matrix barcodes creation
Barcode RDLC > Barcode in RDLC
Barcode Generation Guide for RDLC Report
Avapose.Barcode for RDLC control is a robust and powerful barcode generator library that lets you to add barcode generation and printing features into local RDLC report files easily and fast. And its C# & VB.NET source code is available to order.
Barcodes are dynamically created in local RDLC report as high-quality Gif, Tiff, Bmp, Png or Jpeg image. It is quick and easy to export barcode images on PDF, html, and Excel.
This barcode control can be used as strong-named and signed DLL without loaded on a form, and supports quick barcode generation and easy barcode property customization in Visual Basic.NET, C#.NET. This page gives you a detail guide of generating barcodes for RDLC.
.NET Barcode for RDLC Report - Supported Barcodes
2D Barcodes:
QR Code

PDF 417 Data Matrix
1D Barcodes:
Codabar Code 11 Code 25 Code 39 Code 93
Code 128 EAN 8 EAN 13 EAN 128 Identcode
Onecode Interleaved 25 ISBN ISSN ITF-14
.NET Barcode for RDLC Report - Installation Requirements


  • Windows XP, Windows Vista, Windows 7,etc
  • .NET 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

Setup Process:

  1. Download.NET Barcode for RDLC and unzip it;
  2. Add a new "DataSet" to the project in Visual Studio;
  3. Create a new report in RDLC;
  4. Add RDLC Barcode Class Library to your project reference;
.NET Barcode for RDLC - Barcode Generation in RDLC in .NET WinForms
  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"/"Avapose.matrixbarcode.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 barcode images displayed on the report. Use linear barcode Code 128 as an example:

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.Code39;
// 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.Code39
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
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