GS1 QR Code Barcodes in SQL Server Reporting Services SSRS
GS1 Data Matrix Barcodes with SQL Server Reporting Services SSRS
- This tutorial shows how you can add GS1 DataMatrix barcodes to SQL Server Reporting Services.
Before You Begin
- Ensure BarCodeWizFonts.QrCode.dll as well as the font files are installed on the server.
- See BarCodeWiz QR Code 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/c285e3ab-f7ce-429d-bb43-8cef74fe8426-ssrsdll2.png)
Add Reference:
- In the Report Properties window, select the References section.
- 1) Click Add to add the assembly.
- 2) Type: BarCodeWizFonts.QrCode.
- 3) Click Add to add a class instance.
- 4) Type BarCodeWizFonts.QrCode.QrCodeFonts for class name and MyQrCode for instance name.
![](https://media.barcodewiz.com/images/29a917cf-2fcf-4332-ba60-e881fecef6ef-QR-SSRS-002.png)
Step 2. Prepare your Data
Prepare your DataSets. Feel free to use our (from the example attached to our program) Our data has the following structure.:
![](https://media.barcodewiz.com/images/bc7f7ca0-750e-43c2-847f-a048c0d7df3a-GS1-QR-SSRS-001.png)
Step 3. Create a Table
- Insert a table into your report
![](https://media.barcodewiz.com/images/0e04bb93-e8f1-4408-a348-efac87a2755a-GS1-QR-SSRS-002.png)
Edit the Expression
![](https://media.barcodewiz.com/images/91022ba2-f9f4-4025-a294-b9dabe469dc3-GS1-QR-SSRS-003.png)
Step 4. Edit the expression as shown
- Enter the following value in the editor
=Code.MyQrCode.Encode( strBarcode:= "(01)"+Fields!gtin.Value+"(17)"+Fields!exp_date.Value+"(10)"+Fields!batch.Value, fnc1Mode:=1, symbolSize:=1, borderWidth:=1, quietZoneWidth:=5)
- NOTE: To properly encode your barcode set the fnc1Mode variable to 1.
Step 5. Set Font Properties
- Set Font Name to: BCW_QR
NOTE: For smaller barcodes, you can set the point size as low as 2pt
![](https://media.barcodewiz.com/images/27405a15-d0b8-4974-b22b-756ff738699a-GS1-QR-SSRS-005.png)
Let's preview the report.
It should look like this:
![](https://media.barcodewiz.com/images/0e4a3dae-4d10-4857-94d3-ba15849b8d09-GS1-QR-SSRS-004.png)