BarCodeWiz Logo

Code 128 Barcodes in SQL Server Reporting Services SSRS -As Images

How to create barcodes in SSRS

  • BarCodeWiz Code 128 Fonts may be used to create barcodes in SSRS.
  • Follow the steps below to add barcodes to your own report.

Before You Begin


Step 1. 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.Code128
  • 3) Click Add to add a class instance
  • 4) Type BarCodeWizFonts.Code128.Code128Fonts for class name and MyCode128 for instance name

Step 2. Insert image

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

Step 3. Edit Image Properties.

  • Right - click on the table cell with image field and select Image Properties...

  1. 1. Select Database as the image source.
  2. 2. Select image/png as the MIME type.
  3. 3. Click on the Fx button to open the Expression window.

  • Set the value for the expression:
    =Code.MyCode128.ToImageBytes( Code.MyCode128.Code128B(Fields!item_sku.Value ), "BCW_Code128B_1", 24, 300.0, "png" )
  • Replace item_sku with the name of the field from your dataset.

Ready!

  • Preview the generated report.