We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

BarCode in SSRS Header

I need to put a bar code in the header region of an SSRS report. SSRS doesn't allow custom report items in the header so I can't just drop it in.

I know I can place an image in the header and use code to get the barcode into the image. How can I do this with the Reporting Services version of Aspose.BarCode? I don't see any methods for rendering the image in Aspose.BarCode.ReportingServices.dll.



Hi Dave,

Thanks for considering Aspose.

We are looking into it and will inform you about the solution shortly.


Could you please tell us which version of Visual Studio and SQL Server Reporting Services are you using?

Hi Dave,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please find the attached beta dll for VS 2005 and SQL SRS 2005 that contains the method that renders the barcode image. Please copy the dll in the following 2 directories:

· C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

· C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

SQL SRS 2005 does not support custom report items in header, so its true that you cannot drag the BarCode control and use it. You need to place image on the report header. Go to Report à Report Properties à References tab. Add a reference to this beta dll. In Classes section, give Aspose.BarCode.ReportingServices.BarCodeBuilder as class name and objBarcode as Instance name. In the code tab, add the following code:

Public Function GetBarCodeImage(ByVal codetext As String) As Byte()

objBarcode.CodeText = codetext

objBarcode.SymbologyType = Aspose.BarCode.ReportingServices.Symbology.Code128

return objBarcode.GetBarCodeImage()

End Function

Set the following image properties:

MIMEType: image/bmp

Source: Database

Value: =code.GetBarCodeImage("any code text")

Go to Preview tab of the report and click on the “Print Layout” toolbar button to view the header.

Thanks, this is what I needed.