Key in your email here
Font Products
 Barcode Fonts
  • Code 39 Barcode
  • Code 128 Barcode
  • UCCEAN Barcode
  • ITF14 Barcode
  • I2of5 Barcode
  • UPC/EAN Barcode
  • GS1 Databar Barcode
 Download ConnectCode
 MICR Fonts
  • MICR E13B
  • MICR CMC7
 Download MICR

Using the Fonts
  • With the Font Encoder
  • With Excel
  • With Access
  • With Word
  • With Crystal Reports
  • Application Integration
     • With C#
     • With Visual Basic
     • With WPF (C#)
     • With WPF (VB)
     • With Visual C++

SDK Products
 .Net Barcode SDK
 Download SDK

Software Products
 Barcode Software Imager
 Download Imager


Barcode FAQ
 Barcode
  • Barcode Symbology
  • Barcode FAQ
  • Barcode Images
  • Barcode Font
 RFID
  • What is RFID?
 Thermal Printers
 Barcode Scanners
 OCR & OCR Fonts
 MICR & MICR Fonts

Barcode Resources
 Web Resources
 The Barcode CD Project
 Mobile Barcode Project



Reporting Services Barcode

After installing the ConnectCode Barcode Control, you will need to configure it to work with Microsoft SQL 2005/2008 Server Reporting Services. This means you have to edit the Reporting Services Configuration files (*.config) to allow FullTrust permission for the ConnectCodeBarcodeLibrary.dll and copy the ConnectCodeBarcodeLibrary.dll into the necessary folders.

Please visit the specific subsections to setup the SDK for Visual Studio/Reporting Services.

Run Visual Studio 2005/2008 and open an existing Report Server project. Alternatively, you may create a new project by going to File :: New :: Project. In the New Project dialog, select Business Intelligence Projects in the Project Types box choose Report Server Project.

Select a DataSource and create a Report for the Datasource.

Double click the Report File (.rdl) to open it. Create a new column for the report to hold the barcode.

Next add reference to the ConnectCodeBarcodeLibrary.dll. This may be done by choosing the Report menu and selecting Report Properties

You will also need to add references to the System.Drawing and System.Windows.Forms assemblies. You should see the Reference Tab of the Report Properties dialog as follows.

Create an instance of Connectcode Barcode Control by typing Net.ConnectCode.BarcodeControl under Class Name and name the instance as barcodecontrol. You are now ready to use the control in your project.

Next, switch to the Code Tab of the Report Properties dialog. Enter a VB function that will make use of the instance barcodecontrol that we have created earlier in the Reference tab.


Public Function MakeBarcodeImage(datastring As String) as Byte()

'Set symbology
barcodecontrol.BarcodeType = Net.ConnectCode.Barcode.Barcodes.BarcodeEnum
.Code128Auto
barcodecontrol.Data = datastring

'Make a high resolution (large) image
barcodecontrol.Height = 170
barcodecontrol.Width = 750

'Enter other properties of the Barcode Control here
barcodecontrol.HumanText = Net.ConnectCode.Barcode.Barcodes.YesNoEnum.No

return barcodecontrol.GetPNGImage()

End Function

The MakeBarcodeImage(datastring As String) will take in a string as its parameter. This function, which uses the BarcodeControl, will take in a datastring , encode it , and return a barcode image in the PNG format. We will need to place this image in the Barcode column we have inserted into our report earlier.

To do so, drag an image from the toolbox into the Barcode column.

Select the image you have just dragged and modify its properties.

Set the Source as Database and its MIME Type as image/png.

Set the Size property of the image so that it is big enough to contain the barcode. For example 3in, 0.7in

Set the Sizing property of the image to FitProportional

Set the Value property of the image to =Code. MakeBarcodeImage(value).

For example, if you have a data source table with a field named Product, you can set it as =Code. MakeBarcodeImage(Fields!Product.Value)

You are now ready to preview the report. You should see something like the screen below.

Back to .Net Barcode SDK

Back to Barcode Fonts and Software

Copyright (C) 2004-2009, BarcodeResource.com. All Rights Reserved.