BarCodeWiz Logo

UPC EAN Barcodes in SQL Server Reporting Services (SSRS) - as Text

How to create barcodes in SSRS

  • BarCodeWiz UPC EAN Fonts can be used to create barcodes in SSRS.
  • Follow the steps below, or watch the video. 

Before You Begin


Step 1. Create a new report.

  • Click on File > New > Blank Report

Step 2. Connect your Data Source.

  • In this example, we are using a simple 3 column items data set.

Step 3. Configure Report Properties

  • Open Properties Window - right-click in the report background area and click Report Properties...

Add Reference:

  • In the Report Properties window, select the References section.
  • 1) Click Add to add the assembly.
  • 2) Type: BarCodeWizFonts.UPCEAN.
  • 3) Click Add to add a class instance.
  • 4) Type BarCodeWizFonts.UPCEAN.UPCEANFonts for class name and MyUPCEAN for instance name.

Step 4. Insert a Text Box

  • Insert a text box into the report by dragging one of the columns from your DataSet.
  • In this example, the text box is placed inside a Table.

  • Right-Click > Expression... .

  • Edit the expression as shown
  • We are using the function UPCA()

  • Let's preview the report. It should look like this.:

Set Font Properties

  • Set Font Name to: BCW_UPCEAN_2
  • Set Font Size to: 22

Step 5. Finalize and generate report

  • Under the Home tab, in the Views section click Run to generate the report.

  • The final result

UPC EAN Fonts Functions in SSRS


UPCA(barcode as String)

  • Encodes the barcode in UPC-A format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 11 or 12 digits. Enter 11 digits to have the check digit added automatically. Also accepts 13, 14, 15, or 17 digits for +2 and +5 Add-on

UPCE(barcode as String)

  • Encodes the barcode in UPC-E format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 7 or 8 digits. Leading zero is required. Enter 7 digits to have the check digit added automatically. Also accepts 9,10, 12, or 13 digits for +2 and +5 Add-on

EAN13(barcode as String)

  • Encodes the barcode in EAN-13 format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 12 or 13 digits. Enter 12 digits to have the check digit added automatically. Also accepts 14, 15, 17, or 18 digits for +2 and +5 Add-on

EAN8(barcode as String)

  • Encodes the barcode in EAN-8 format.
  • The function parameters are:

    barcode: String value with the barcode data to encode. Must be 7 or 8 digits. Enter 7 digits to have the check digit added automatically.

ToImageBytes(strText As String, fontName As String, Optional fontSize As Integer = 12, Optional dpi As Float = 96f, Optional imageType As String = "png") As Byte[]

  • Converts text into image as byte array. May be used to return barcodes as images.
  • The function parameters are:

    strText: Text to be converted to image
    fontName: Font to use for encoded text
    fontSize: Font point size of the text
    dpi: Dots per inch of resulting image. Default value is 96.0 (screen resolution)
    imageType: Image format to return. Possible values are: png, gif, bmp, jpg