Data Matrix Barcodes with SQL Server Reporting Services SSRS
How to create barcodes in SSRS using BarCodeWiz DataMatrix Fonts
- This tutorial shows how you can add DataMatrix 2D barcodes to SQL Server Reporting Services.
- See the video or simply follow the steps below.
![](https://media.barcodewiz.com/images/cc541f1a-9238-429f-bb40-ba485c6bd9bc-dm-ssrs9.png)
Before You Begin
- Ensure BarCodeWizFonts.DataMatrix.dll as well as the font files are installed on the server.
- See BarCodeWiz 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.DataMatrix
- 3) Click Add to add a class instance
- 4) Type BarCodeWizFonts.DataMatrix.DataMatrixFonts for class name and MyDataMatrix for instance name
![](https://media.barcodewiz.com/images/b12d7679-ac50-484f-b74a-0adbbd061064-dm-ssrs2_1.png)
Step 2. 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
![](https://media.barcodewiz.com/images/a1dc46cd-c2b0-462d-8af5-dc8c89fdcc1f-dm-ssrs3.png)
Step 3. Edit Text Box Properties
- Right-Click > Expression...
![](https://media.barcodewiz.com/images/7280d063-5108-4f6c-920d-1906db6e76e0-dm-ssrs4.png)
- Edit the expression as shown
![](https://media.barcodewiz.com/images/8ae1e312-8e45-4565-a368-b7a4cf26adf5-dm-ssrs5_1.png)
- Let's preview the report. It should look like this:
![](https://media.barcodewiz.com/images/ba0ab921-2b0d-4a10-bc99-3b480e2a4d88-dm-ssrs6_1.png)
Step 4. Set Font Properties
- Set Font Name to: BCW_DM
NOTE: For smaller barcodes, you can set the point size as low as 2pt
![](https://media.barcodewiz.com/images/1c11d066-1eae-47aa-a9ee-315ecdcc00f8-dm-ssrs7_1.png)
The Result
- The report is now ready.
![](https://media.barcodewiz.com/images/6cd293f7-b01a-4454-a43c-fef056b1ab28-dm-ssrs8.png)