Barcode in RDLC > VB.NET Barcode
 How to Generate Barcodes in RDLC using VB.NET
	Bizcode Generator for RDLC is a robust and mature .NET component that supports generating barcodes in RDLC local reports with high quality. Barcode Control for RDLC performs as a dynamical dll which is easy to be installed in Visual Studio without other plug-ins or barcode font involved, while generation process is quite simple and fast either.
RDLC Barcode Generator Requirements
	Windows OS 
	Can be used in Microsoft Windows 7, Windows Vista, Windows XP, Windows Server 2008, Windows Server 2005, etc  | 
	.NET Technology Support 
	Fully written in managed C# in .NET 2.0, 3.0, 3.5 and 4.0 in Visual Studio 2005/2008/2010  | 
RDLC Barcode Generator Test Environment 
	Test Environment 
	Test this barcode DLL in these environments which have Microsoft Windows XP, Microsoft Visual Studio 2005 and Visual Basic installed  | 
	Test Product 
	BizCode Generator for RDLC  | 
Generate Barcodes in RDLC in Windows Applications Using Visual Basic
		
		- Download BizCode Generator for RDLC Free Trial and unzip it;
 - Open Visual Studio and create a new Windows Forms project naming "RDLC Barcode Demo";
 - 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[]";
 - Create a new report and name "Report1.rdlc";
 - Drag and drop a "Table" onto the report;
 - In the "properties" window, set image item property "MIMEType" to "image/jpeg", "Source" to "Database" and "Value" to "=Fields!Barcode.Value";
12.	Drag a "ReportViewer" to "Form1.cs"; - Add "BusinessRefinery.Barcode.Win.dll" to .NET project reference from the "Solution Explorer";
 - Copy the following vb code accordingly into the method Form1_Load and run the project. You can get the QR Code images displayed on the report.
 
private void Form1_Load(object sender, EventArgs e)
{
    // load data to the data table
  this.vProductAndDescriptionTableAdapter.Fill
(this.AdventureWorks.vProductAndDescription);
// create a Matrix barcode object
Matrix barcode = new Matrix();
    // set barcode type to QR Code
    barcode.Type = BarcodeType.QRCode;
    // 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();
}
Generate Barcodes in RDLC in ASP.NET Using Visual Basic
		
		- Download BizCode Generator for RDLC Free Trial and unzip it;
 - Open Visual Studio, and create ASP.NET web form project;
 - Add "BusinessRefinery.Barcode.Web.dll" to the project reference;
 - Activate the "Solution Explorer" window, and right-click the web application to add a class;
 - Copy the C# sample code into the created class "APP_Code/Class1.cs";
 - Activate "Solution Explorer", and right-click the project to add a report;
 - Go to "Report Item" in Toolbox, and insert a table into report;
 - Switch to "Website Data Source", add "Name" and "Price" items to the report;
 - Drag and drop an Image item to the "Barcode" column and setting the properties of imge: Set "MIMEType" to "image/jpeg" , "Source" to "Database" and "Value" to "=Fields!Barcode.Value", and save the report;
 - Activate "Solution Explorer", and right-click "Default.aspx" to click "View Designer" menu;
 - Drag "View Designer" to the report, and then choose created report "Report1.rdlc",
 - Debug the project.
 
Imports System.Collections.Generic
Imports BusinessRefinery.Barcode
Public Class Product
    Private m_name As 
 String
    Private m_price As Integer
    Private m_bit As Byte()
    Public Sub New(name As String, price As Integer, 
data As String)
        m_name = name
        m_price = price
        Dim barcode As NewQRCode()
        PDF417 barcode = new PDF417();
        barcode.Code = "QR Code"
        m_bit = barcode.drawBarcodeAsBytes()
    End Sub
    Public ReadOnly Property Bit() As Byte()
        Get
            Return m_bit
        End Get
    End Property
    Public ReadOnly Property Name() As String
        Get
            Return m_name
        End Get
    End Property
    Public ReadOnly Property Price() As Integer
        Get
            Return m_price
        End Get
    End Property
End Class
Public Class Merchant
    Private m_products As List(Of Product)
    Public Sub New()
        m_products = New List(Of Product)()
        m_products.Add(New Product("code128", 25, "code128"))
        m_products.Add(New Product("code39", 30, "code39"))
        m_products.Add(New Product("qrcode", 15, "qrcode"))
    End Sub
    Public Function GetProducts() As List(Of Product)
        Return m_products
    End Function
End Class