Here is an easy tutorial, which will demonstrate how to use Aspose.BarCode for Reporting Services to generate barcodes for your reports. Before starting, please check out System Requirements.
Following is the step by step guide to create demo application:
- Create Report Project and choose Data Source.
- Add Barcode on the Report.
Create Report Project and Choose Data Source
Step 1. Start Visual Studio .NET 2005 and create a new report project by choosing Report Server Project Wizard from Visual Studio installed templates .
Step 2. Add a new Data Source to the project.
Step 3. Add SQL Query to retrieve data from the data source.
Step 4. Choose a Tabular report type.
Step 5. Select data fields returned by the query to appear on report.
Step 6. Choose a Table Style for the report.
Step 7. Choose a location to deploy the report.
Step 8. Set the name of the report and press finish button to complete the default wizard.
Add Barcode on the Report
Step 1. Add a new column for barcode images. Select the first column and right-click to insert a column to the left, the barcode images will be displayed on the new column.
Step 2. Adjust the size of the first column to preserve enough space for barcode images.
Step 3. Drag and drop Aspose.BarCode for Reporting Services from Visual Studio Toolbox to the first column.
Step 4. Right-click on the barcode image to open context menu. Select Properties to open Barcode Settings dialog box.
Step 5. Set CodeText property to an expression by pressing the fx button. Type the following expression: Fields! CodeText.Value, which indicates to use the value of CodeText field as the CodeText of the barcode image.
Step 6. Press OK button of Edit Expression dialog box and BarCode Settings dialog box to apply barcode settings.
Step 7. Preview and deploy the report.