SSRS Barcode Generator Service Tutorial

Buy License Demo Now System Status Release Log

SSRS Overview

Reporting Services provides two authoring environments to create and edit report definition (RDL) files:

  • SSRS Report Builder is a reporting environment for users who prefer to work in the Microsoft Office environment.
  • SSRS Report Designer in Business Intelligence Development Studio is a reporting environment within Visual Studio.

Report Builder Tutorial

  1. Open Report Builder, create the Data Source Connections, connect to the database, and continue to set up the report. Step-by-step instructions.
  2. Select the field needed to barcode and add a separate column next to that field to position the barcode on the report.
    Create a field for the barcode
  3. In the Properties window, click the down arrow next to Value in the BackgroundImage section to choose the corresponding field to build the expression.
    Build the expression for the barcode
    In this example, the first expression is the value needed for this tutorial "=First(Fields!OrderId.Value, "DataSet1")". The bolded text is the actual field name parameter required to complete the URL in the following step.
  4. Open the SSRS Generator URL in a browser and verify a default barcode image appears. The unique SSRS Generator URL is obtained after purchase. To demo the solution, the following URLs may be used for evaluation purposes only:
  5. In the BackgroundImage section,
    • Set the Source to External.
    • Set the Value to the SSRS Generator URL and the value of the field that will be encoded. For example:
      ="https://www.bcgen.com/ssrs/demo-c128.aspx?D=" & Fields!OrderId.Value

      Setting BackgroundImage properties.
      • Leave the MIMEType image setting blank.
      • Set the BackgroundRepeat to Clip.
      • If additional properties are necessary, they should be added to the URL before "D=", for example:
        ="https://www.bcgen.com/ssrs/demo-c128.aspx?X=2&D=" & Fields!OrderId.Value
  6. Run the report to verify the barcode is appearing:
    Barcode streamed into Report Builder

Report Designer Tutorial (Visual Studio)

  1. Run Visual Studio and open the SSRS report project.
  2. Right-click the .rdl or .rdlc file located in the Solution Explorer and select Properties.
  3. Select the column to barcode.
  4. In the Properties, expand the BackgroundImage property.
  5. Open the SSRS Generator URL in a browser and verify a default barcode image appears. The unique SSRS Generator URL is obtained after purchase. To demo the solution, the following URLs may be used for evaluation purposes only:
  6. In the BackgroundImage section,
    • Set the Source to External.
    • Set the Value to the SSRS Generator URL and the value of the field that will be encoded. For example:
      ="https://www.bcgen.com/ssrs/demo-c128.aspx?D=" & Fields!OrderId.Value

      Setting BackgroundImage properties.
      • Leave the MIMEType image setting blank.
      • Set the BackgroundRepeat to Clip.
      • If additional properties are necessary, they should be added to the URL before "D=", for example:
        ="https://www.bcgen.com/ssrs/demo-c128.aspx?X=2&D=" & Fields!OrderId.Value
  7. Preview the SSRS Report:
    Preview SSRS Report Designer
  8. To deploy the solution to the Report Server, select Build - Deploy Solution. For guidance on how to set up deployment, view Microsoft's How to Set Deployment Properties article.

Parameters

Unless specific requirements dictate otherwise, consider using default values for all properties. Each symbology has its own individual script. The Linear package includes files for Code 128, GS1-128, Interleaved 2 of 5, MSI, and USPS IMb. The Linear plus 2D package also includes QR Code, Data Matrix, PDF417, and DotCode. Script parameters are used with a question mark first and then the & character. For example: https://www.bcgen.com/ssrs/demo-qrcode.aspx?D=www.idautomation.com&X=4&Q=3

Purpose Parameter Default Description
Apply Tilde PT T When True in Code 128 with the Auto character set, the format ~??? may be used to specify the ASCII code of the character to be encoded, and several other ApplyTilde Options are enabled including encoding of GS1-128 AIs.
Bar Height BH 40 The barcode height in pixels. The default value of 40 generates a symbol that is about 0.4" tall.
Check Character CC T* Automatically adds the check digit to the barcode when equal to "T".
*The default in Code-39 is F. To create a LOGMARS barcode, this must be set to True.
Check Character in Text CT T Automatically adds the check digit that is encoded in the barcode to the human-readable text that is displayed when equal to "T".
Data Encoded D na The data that is to be encoded in the barcode.
Font Size FS 12 The font size used for human-readable text.
*Only values of 10 and 12 are applicable. Any other values must be implemented manually by displaying a text field below the barcode.
Image Type I BMP The image type streamed. Valid values are BMP, PNG, JPG, and JPEG. The BMP image type has a 1-bit depth and is usually smaller in size than PNG or JPEG images. Only available in version 2019 and greater.
Narrow to Wide Ratio N 2 The narrow-to-wide ratio of symbologies that only contain narrow and wide bars such as Code 39, Interleaved 2 of 5, and MSI. Valid values are 2 and 3.
Orientation O 0 The orientation of the barcode. Valid values are 0, 90, 180, and 270.
ShowText ST T If set to F, the human-readable text interpretation will not be displayed with the barcode.
XDimension in pixels X 1 The number of pixels to define the overall barcode width. Default = 1 which is 1/96 of an inch and about 12 MILS. Valid values are 1-8.
Quiet Zone Q 1 The margin around the symbol.
GS1 DataBar Specific Parameter Default Property Description
Segments SG 6 Common values are 4, 6, 8, and 22. The setting of 22 disables the stacked capability.
Data Matrix Specific Parameter Default Property Description
Process Tilde PT T When set to "F", the tilde "~" functionality will not be processed. As explained in the Data Matrix FAQ, the tilde is used for GS1-DataMatrix and encoding ASCII codes.
Encoding Mode MODE 0 The Encoding Mode for data being encoded. Valid parameters are -1=Auto (Default), 0=ASCII, 1=C40, 2=TEXT and 3=BASE256. To encode GS1-DataMatrix, ensure MODE is set to -1 or 0.
Preferred Format PFMT 0 Sets the preferred format represented by a number; valid values are from 1 (10X10) to 24 (144X144) and from 25 (8X18) to 30 (16X48); the default value of '0' is used for automatic formatting. If the component needs more space to create the symbol, this property will be ignored.
PDF417 Specific Parameter Default Property Description
Apply Tilde PT T When true, the format ~??? may be used to specify the ASCII code of the character to be encoded.
Columns COL 0 The number of data columns in the symbol. 0 = automatic.
Error Correction Level ECL 0 The amount of error correction in the symbol. The default setting of 0 performs automatic selection.
Mode MODE B The mode of compaction used to encode data in the symbol. Valid values are "B" for Binary or "T" for TEXT.
Truncation TRN F A truncated PDF417 symbol is more area efficient.
X to Y Ratio XYR 3 The X multiple height of individual cells.
QR-Code Specific Parameter Default Description
Process Tilde PT T When set to "F", the tilde "~" functionality will not be processed. As explained in the QR-Code FAQ, the tilde is used for GS1-QRCode and encoding ASCII codes.
Error Correction Level ECL M The level of error correction. Valid values are L, M, Q & H.
Encoding Mode MODE B The Encoding Mode. Valid values are B (binary), A (alphanumeric), and N (numeric).
Process Mask PM T When set to F the mask is not optimized, which will improve processing time when generating many barcodes at the same time.
Version V 1 The version of the symbol. Setting this value to -3 can generate a Micro QR Code symbol.

Encoding GS1 DataBar

Four types of GS1 DataBar symbologies are provided: GS1 DataBar Omnidirectional, GS1 DataBar Stacked Omnidirectional, GS1 DataBar Expanded Omnidirectional, and GS1 DataBar Expanded Stacked Omnidirectional. These are also referred to as the DataBar POS symbols.

  • databar.aspx and databarstk.aspx (DataBar Stacked)
    The DataToEncode is 14 digits. The last digit in the DataToEncode is the check digit. If unknown, enter 0 for the check digit. If 14 digits are not entered, zeros will be added to the beginning of the data.
  • databarexp.aspx (DataBar Expanded)
    The DataToEncode for this barcode type prefers parentheses around each AI in the barcode. For example: "(01)34567890123457(17)991231".
    • GS1 DataBar Expanded (not stacked) symbols are created by setting the segments (SG) property to 22.
      For Example: https://www.bcgen.com/ssrs/demo-databarexp.aspx?D=(01)00123456789012(15)991231&SG=22
      GS1 DataBar Expanded
    • GS1 DataBar Expanded Stacked symbols are created and sized by setting the segments (SG) property to a low even number such as 4, 6, or 8.
      For Example: https://www.bcgen.com/ssrs/demo-databarexp.aspx?D=(01)00123456789012(15)991231&SG=4
      GS1 DataBar Expanded Stacked

Demo

A "DEMO" version of this service is provided online for evaluation purposes only and includes a watermark below the symbol.
NOTE: The watermark does not appear in the purchased version
.
Use the SSRS Generator URLs of the demo version below with the Report Builder or Report Designer tutorials.
https://www.bcgen.com/ssrs/demo-c128.aspx (Code 128 with GS1-128)
https://www.bcgen.com/ssrs/demo-databarexp.aspx (GS1 DataBar Expanded)
https://www.bcgen.com/ssrs/demo-dm.aspx (Data Matrix ECC200 with GS1)
https://www.bcgen.com/ssrs/demo-pdf.aspx (PDF417)
https://www.bcgen.com/ssrs/demo-qrcode.aspx (QR Code with GS1)

Technical Support Issues

Barcode Image not Generating:
Ensure the system running the report has access to the server generating barcodes. Open the System Status Site and verify the barcode generators are operational. The service may be tested by accessing the barcode URL directly. For example, https://www.bcgen.com/ssrs/demo-c128.aspx should create a default barcode image.

Slow Performance when Generating Multiple Barcodes:
If a large number of barcodes are generated from the same system at the same time, some latency may be noticed. If this is an issue, consider installing the SSRS Generator Script locally or on an Intranet. Performance over multiple clients should not be an issue. A performance test performed in 2017 shows an average response time of 33 ms for 2000 clients requesting barcodes during business hours.

Common Errors & Additional Support: