BarCodeWiz Logo

Data Matrix 2D Barcodes in SQL Server Reporting Services SSRS -As Images

How to (easily) create barcodes in SSRS

  • BarCodeWiz Data Matrix Fonts may be used to create barcodes as images in SSRS.
  • Follow the steps below to add barcodes to your own report.
Preview of a report made in SSRS with BarCodeWiz Data Matrix Fonts with barcode encoded as an image

Before You Begin

Step 1. 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.
Insert an image object into your report to encode Data Matrix barcode using BarCodeWiz Data Matrix Fonts

Step 2. Edit Image Properties.

  • 1) Right - click on an image and select Properties
  • 2) Select Database as the image source
  • 3) Select image/png as the MIME type
  • 4) Click on the Fx button to open the Expression window

  • Set the value for the expression:
=Code.MyDataMatrix.ToImageBytes( Code.MyDataMatrix.Encode( Fields!item_sku.Value, quietZoneWidth:=5 ), "BCW_DM", 8, 96.0 )
  • This creates a PNG image with font name BCW_DM, size 8pt, and resolution of 96DPI.
  • Replace item_sku with the name of the field from your dataset.

 NOTE:  For smaller barcodes, you can set the point size as low as 2pt

Setting the expression for BarCodeWiz Data Matrix function to encode the barcode as an image

The report is ready!

  • Preview the generated report.
Preview of a report made in SSRS with barcodes encoded as images using BarCodeWiz Data Matrix Fonts