StrokeScribe Barcode Library for SSRS - the API Overview
This library allows to display linear and 2D barcodes in SSRS reports.
Download
You need to stop the report server when updating the library.
Properties and Methods
The class library structure in the current release:
Namespace StrokeScribeSSRS
Public Class Barcode
Public Function Initialize() As Long
Public Function SetTextProp(PropName As String, value As String) As Long
Public Function SetLongProp(PropName As String, value As Long) As Long
Public Function GetPictureArray(Format As Long, W As Long, H As Long, ByRef arr As Byte()) As Long
Public Function GetLongProp(PropName As String, ByRef val As Long) As Long
End Class
End Namespace
SetLongProp
Sets the value of a numeric property of the barcode generator.
Syntax
- Basic syntax: Public Function SetLongProp(PropName As String, value As Long) As Long
Parameters:
- name - Name of the property.
- val - The value to assign to the property.
Return value
- Returns 0 on success.
- Error codes.
Examples
Choosing a barcode type:
barcode.SetLongProp ("Alphabet", 5) ' 5 = CODE128
Encoding data in UTF-8:
barcode.SetLongProp ("CodePage", 65001)
Remarks
The list of properties that can be modified through the SetLongProp (the library shares the property names with the ActiveX):
- Alphabet
- CodePage
- ProcessTilde
- QrECL
- QrMinVersion
- NWRatio
- AztecMinLayers
- DataMatrixMinSize
- AztecECL
- PDF417Cols
- PDF417Rows
- PDF417ErrLevel
- Code11CheckDigits
- Transparent
- Rotation
- CompactPDF417
- PDF417ModuleAspectRatio
- PDF417HorzQuietZone
- PDF417VertQuietZone
- FontAntialiasing
- TextJustify
- FontSize
- FontColor
- BkgndColor
- HBorderSize
- VBorderPercent
- ShowText
- ISBN10
- ITF14BearerBox
- ITF14BearerWidth
- QuietZone2D
- CodabarHasCheckDigit
- Code39HasCheckDigit
- ECI
- SaCount
- SaPos
- SaID
SetTextProp
Sets the value of a text property.
Syntax
- Basic syntax: Public Function SetTextProp(PropName As String, value As String) As Long
Parameters:
- name - Name of the property.
- val - The value to assign to the property.
Return value
- Returns 0 on success.
- Error codes.
Examples
Encoding a text string in the barcode:
barcode.SetTextProp("Text", "ABCDE3457")
Modifying the text below the barcode:
barcode.SetTextProp ("TextBelow", "Some text")
Remarks
The list of properties that can be modified through the SetTextProp (the library shares the property names with the ActiveX):
GetLongProp
Retrieves a value associated with the specified property name.
Syntax
- Basic syntax: Public Function GetLongProp(PropName As String, ByRef val As Long) As Long
Parameters:
- name - Name of the property.
- val - A reference to the variable that receives the property value.
Return value
- Returns 0 on success.
- Error codes.
Example
See GetPictureArray.
Remarks
The list of properties that can be read through the GetLongProp (the library shares property names with the ActiveX):
GetPictureArray
The function creates a byte array that stores the image bytes in BMP/JPG/GIF formats.
Syntax
- Basic syntax: Public Function GetPictureArray(Format As Long, W As Long, H As Long, ByRef arr As Byte()) As Long
Parameters:
- Format - the desired image format(BMP = 0, GIF = 1, PNG = 2, JPG = 3).
- W - the desired image width in pixels.
- H - the desired image height in pixels.
- arr - a reference to a byte array that receives the image data.
Return value
- Returns 0 on success.
- Error codes.
Example
barcode.Initialize
barcode.SetLongProp ("Alphabet", 25) ' 25 = QR Code
barcode.SetTextProp ("Text", "123ABC")
dim rc as long
dim w as long
rc = barcode.GetLongProp("BitmapW", w) ' The minimum width of the picture (in pixels) that can fit the barcode
if rc<>0 then return nothing
dim arr as byte()
rc = barcode.GetPictureArray(1, w, w, arr) ' A square barcode with 1x1px modules in GIF format
if rc<>0 then return nothing
return arr
Example
barcode.Initialize
barcode.SetLongProp ("Alphabet", 5) ' 5 = CODE 128
barcode.SetTextProp ("Text", "123ABC")
dim rc as long
dim w as long
rc = barcode.GetLongProp("BitmapW", w) ' The minimum width of the picture (in pixels) that can fit the barcode
if rc<>0 then return nothing
dim arr as byte()
rc = barcode.GetPictureArray(1, w*3, w, arr) ' With linear barcodes, you may specify any value for the image height.
if rc<>0 then return nothing
return arr
© 2026 StrokeScribe. All rights reserved. Use of any portion of this site constitutes acceptance of our Terms of Use and Privacy Policy. The website material may not be reproduced, except with the prior written permission.