Interleaved 2 of 5 Barcodes in RDLC Reports
Generating Reports with Interleaved 2 of 5 Barcodes in Visual Studio
- This tutorial shows how you can add Interleaved 2 of 5 barcodes to Visual Studio RDLC Reports.
- Watch the video or follow the steps below.
![](https://media.barcodewiz.com/images/9b093b40-44d0-4394-9568-a86f6480c31d-ITF-RDLC-THUMB.png)
Before You Begin...
- Make sure you've got Microsoft RDLC Report Designer installed.
- (1) To install it, go to Extensions / Manage Extensions
- (2) Type RDLC in the search field
- (3) Click Download
- Proceed with installation.
![Installation of Microsoft RDLC Report Designer in Visual Studio](https://media.barcodewiz.com/images/2a841ea8-4ced-43fe-9866-275aa016b7ad-RDLC-001.png)
- Check if you have Microsoft.SqlServer.Types installed.
- Otherwise, go to Project / Manage NuGet Packages...
- On the NuGet window search for Microsoft.SqlServer.Types
- Click on Install and follow the installation wizard
![Installation of Microsoft SQL Server Types in Visual Studio](https://media.barcodewiz.com/images/99681afb-7ae6-4622-8894-e51c97cdc209-RDLC-002.png)
Step 1. Create a new Project
- In the main Visual Studio window, select Create a new Project
- Type Reports and select Reports Application (in our case C# project)
![Create a new Reports Application Project in Visual Studio](https://media.barcodewiz.com/images/dbb4b22d-a906-4077-bdc7-ec4048e2eae6-RDLC-003.png)
- Name your project
- Select the Framework that you plan to use
- Click on Create
![](https://media.barcodewiz.com/images/04775306-b7f7-4443-81f8-8a4f40d54b44-ITF-RDLC-001.png)
Step 2. Bind a Data Source
- Select the Data Source Type that you would like to use in your reports (in our case it will be Access Database )
- click on Next
![Choosing a Data Source Type for Visual Studio RDLC Project](https://media.barcodewiz.com/images/e81dc330-939a-466d-95bf-721065e28381-RDLC-004.png)
- Select Dataset for the database model and click Next
![Choosing a Database Model for RDLC Project in Visual Studio](https://media.barcodewiz.com/images/3f1f32a5-39f1-42ca-912b-717fdb426dda-RDLC-005.png)
Click on New Connection...
![Choosing a database Connection type with RDLC Visual Studio Project](https://media.barcodewiz.com/images/f2a67d42-a4eb-478e-b9bc-d426e722820c-RDLC-006.png)
- On the Choose Data Source screen, select Microsoft Access Database File and click on Continue
![Selecting Microsoft Access Database File as a database Connection type with RDLC Visual Studio Project](https://media.barcodewiz.com/images/0c1817a5-098f-4b07-85db-534cc05f338c-RDLC-007.png)
- On the Add Connection screen click on Browse...
![Setting up a database connection to use with RDLC Report](https://media.barcodewiz.com/images/1129d6dc-79ff-43ce-97c9-bfdd7ba14e0c-RDLC-008.png)
- On the Select Microsoft Access Database File screen, browse to the folder Documents\BarCodeWiz Examples\BarCodeWiz Interleaved 2 of 5 Fonts and select Access_Example.mdb
- Click on Open
- On the Add Connection screen, click OK
![](https://media.barcodewiz.com/images/08c5c3c5-db75-4140-b9a1-4d639ffdbe26-ITF-RDLC-002.png)
- Select Tables to use in the Report
- Click on Finish
- Click on Next on the next screen (Dataset Properties)
![](https://media.barcodewiz.com/images/79a0b284-1e42-4bd0-8db6-b232fde4365f-ITF-RDLC-003.png)
- Arrange fields for the report.
- In our case, we have placed all the fields in the Values section without summarizing.
- Click on Next on the next screen (Choose the layout).
- Click on Finish on the screen named Preview.
![](https://media.barcodewiz.com/images/d9d522d7-60b4-46c3-a364-fdc2f0ae8295-ITF-RDLC-004.png)
Step 3. Setting up the Source of the Report's Definition
- Double - click Form1.cs in Solution Explorer
![](https://media.barcodewiz.com/images/b6955bc2-4085-4ae3-84dd-b12b6658eea9-ITF-RDLC-005.png)
- Configure Data Sources:
- Bind your Report with Form1
- Click on the tiny triangle just below the Close button
- Select MyITFReport.Report1.rdlc
![](https://media.barcodewiz.com/images/555cc638-f494-4a70-a87b-f1799996c7c3-ITF-RDLC-006.png)
- Click on Choose Data Sources
![](https://media.barcodewiz.com/images/3d818f46-fbe7-4a81-89b8-9f668348bbf7-ITF-RDLC-007.png)
- Expand available sources and select the one you configured earlier.
- In our case - Widgets
![](https://media.barcodewiz.com/images/05e255c9-f69f-430a-a100-a40a3c505d82-ITF-RDLC-008.png)
Step 4. Changing the Project Platform to x64
- If you Start your Project now, you would receive an error saying there is no OLEDB driver for ACCESS files on the machine.
- To prevent that, we have to switch the debug to x64 processors.
![32-bit OLEDB provider is missing](https://media.barcodewiz.com/images/a9872d68-f55d-4035-be37-9f3ba5fd9b88-RDLC-009.png)
- Go to Configuration Manager...
![Altering configuration of the processor platform](https://media.barcodewiz.com/images/52697027-cc39-4631-a7f0-e1cd45df383e-RDLC-010.png)
- (1) In the Configuration Manager window, select New from the list under Platform
- (2) In New Project Platform, select x64
- Click OK and Close
![](https://media.barcodewiz.com/images/7b82f5a4-49f3-44fa-93ba-fbbefa20404c-ITF-RDLC-009.png)
Step 5. Add reference to BarCodeWizFonts.ITF.dll
- In Solution Explorer right-click on References
- Select Add Reference...
![](https://media.barcodewiz.com/images/da783e74-bb82-49a6-9dbb-4eb64be09d62-ITF-RDLC-010.png)
- In Reference Manager click on Browse.
![Click on Browse to select references](https://media.barcodewiz.com/images/56826298-9668-42ec-83de-6d04636c4b67-RDLC-012.png)
- In the Select the files to reference window, browse to folder Program Files\BarCodeWiz\BarCodeWiz Interleaved 2 of 5 Fonts\DotNet\net20 and add the file BarCodeWizFonts.ITF.dll
- Click OK in the Reference Manager window.
![](https://media.barcodewiz.com/images/5cc52647-47f5-4751-902d-f9ba58eacdcb-ITF-RDLC-011.png)
Step 6. Configure Report Properties
- Right-click on the empty area of Report1.rdlc and select Report Properties
![](https://media.barcodewiz.com/images/0b6506ef-a991-455e-81b8-0e4a264eb81e-ITF-RDLC-012.png)
- In the Report Properties window, select the References section.
- 1) Click Add to add the assembly
- 2) Type: BarCodeWizFonts.ITF
- 3) Click Add to add a class instance
- 4) Type BarCodeWizFonts.ITF.ITFFonts for class name and MyITF for instance name.
![](https://media.barcodewiz.com/images/a07cf15b-9023-406d-a5d8-af77a88b3e6d-ITF-RDLC-013.png)
Step 7. Insert a new column with data to encode
- Right-click on the last column's header and select Insert Column - Right.
- In the new column, click in the upper-right corner and select the column with the data you wish to encode (in our case - PartNumber)
![](https://media.barcodewiz.com/images/e1838015-c3d9-47ed-8f47-ae943e1f9705-ITF-RDLC-014.png)
Step 8. Edit the Expression
- Right-click on the column with the data to encode (item_name) and select Expression
![](https://media.barcodewiz.com/images/72e31cc5-b8b7-4f7f-860f-fb0277d5b121-ITF-RDLC-015.png)
- Edit the Expression:
- =Code.MyITF.ITF( Fields!PartNumber.Value )
- Click OK
![](https://media.barcodewiz.com/images/12ed865a-47f3-4563-9519-cca32844f1d5-ITF-RDLC-016.png)
- Test your Report
- Click Start Without Debugging or press CTRL + F5
- You should see a report similar to the screenshot
![](https://media.barcodewiz.com/images/ea4ed359-dd3c-4c2d-b189-305cc99d2a76-ITF-RDLC-017.png)
Step 9. Set the font
- Change the font to BCW_i25h_2
- Set point size to 22
![](https://media.barcodewiz.com/images/acd967b2-f11c-4787-876e-e9bfc69e7e19-ITF-RDLC-018.png)
The Report is ready!
- Click Start Without Debugging or press CTRL + F5 to preview it
![](https://media.barcodewiz.com/images/e26f1337-4fe6-4f1c-8446-657e9da9eaee-ITF-RDLC-019.png)