Code 39 Barcodes in SQL Server Reporting Services SSRS -As Images
How to create barcodes as Images in SSRS
- BarCodeWiz Code 39 Fonts may be used to create barcodes in SSRS.
- Follow the steps below to add barcodes to your own report.
Before You Begin
- Ensure BarCodeWizFonts.Code39.dll as well as the font files are installed on the server.
- See BarCodeWiz Code 39 Fonts in SSRS - Installation
Step 1. Configure Report Properties
- Open Properties Window - right-click in the report background area and click Report Properties...
- In the Report Properties window, select the References section
- 1) Click Add to add the assembly
- 2) Type: BarCodeWizFonts.Code39
- 3) Click Add to add a class instance
- 4) Type BarCodeWizFonts.Code39.Code39Fonts for class name and MyCode39 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. Select Database as the image source.
- 2. Select image/png as the MIME type.
- 3. Click on the Fx button to open the Expression window.
- Set the value for the expression:
=Code.MyCode39.ToImageBytes( Code.MyCode39.Code39(Fields!item_sku.Value ), "BCW_Code39_1", 24, 300.0, "png" )
- Replace item_sku with the name of the field from your dataset.
- Preview the generated report.