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.
![](https://media.barcodewiz.com/images/4191ac7c-bd39-4fe8-9287-d64726472fd5-C39-SSRS-image-001.png)
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...
![](https://media.barcodewiz.com/images/15fd5784-02a6-4b30-8e84-157909459ff7-ssrsdll2.png)
Add Reference:
- 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
![](https://media.barcodewiz.com/images/756f3287-c65d-4c4e-ba1d-89d393241fd1-C39-SSRS-inst002.png)
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.
![](https://media.barcodewiz.com/images/3abea1f0-4678-40af-8cc0-50ce22099222-C39-SSRS-image-002.png)
Step 3. Edit Image Properties
- Right - click on the table cell with image field and select Image Properties...
![](https://media.barcodewiz.com/images/8cf46efd-f537-446f-8eed-2a378999b3a3-C39-SSRS-image-003.png)
- 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.
![](https://media.barcodewiz.com/images/da01f0dc-5fe4-4b21-b32a-d918e6f999f9-C39-SSRS-image-004.png)
- 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.
![](https://media.barcodewiz.com/images/c7bedf45-f9bc-4e69-85ea-f5ce7bf5ecd9-C39-SSRS-image-005.png)
Ready!
- Preview the generated report.
![](https://media.barcodewiz.com/images/0bfeb1e7-74e2-4bd7-a682-c6bfc1a0a0e3-C39-SSRS-image-006.png)