Hi!
I am using aspose barcode for reporting services and I am having big problems applying the license file. We used the demo version to develop and everything worked well - so we decided to get a license.
We are on Reporting Services 2005 and .Net 2.0. I need the Barcode in a Report Header, so I had to use this code in the Report to make that possible:
Private Shared isLicense As Boolean = False
Public Function GetBarCodeImage(ByVal code As String) As Byte()
If Not isLicense Then
Dim license As Aspose.BarCode.ReportingServices.License = New Aspose.BarCode.ReportingServices.License
License.SetLicense("Aspose.BarCode.lic")
isLicense = true
End If
objBarCode.CodeText = code
objBarCode.SymbologyType = Aspose.BarCode.ReportingServices.Symbology.Code39Standard
objBarCode.CaptionAbove.Visible = false
objBarCode.CaptionBelow.Visible = false
objBarCode.BarHeight = 3
objBarCode.xDimension = .05
objBarCode.Margins.Left = 0
objBarCode.Margins.Right = 0
objBarCode.Margins.Top = 0
objBarCode.Margins.Bottom = 0
Dim ms As New System.IO.MemoryStream
objBarCode.Save(ms,System.Drawing.Imaging.ImageFormat.Bmp)
return ms.GetBuffer()
End Function
This works perfectly when I do not apply the license - as soon as I do, I only get a missing image icon in the report instead of the barcode.
The license is copied to the same folder as the barcode Dlls.