How to Create Barcode in Microsoft Reporting Service 2005
Quick Navigate
- BarcodeLib.Barcode.ReportingService05.dll, BarcodeLib.Barcode.ReportingService05CRI.dll
- Microsoft .NET Framework 2.0 (or later)
- Microsoft Reporting Services 2005
2. Config Sample Database file
We have provided one demo data file named " BarcodeDemoData.mdb" in our trial package.
In the following steps, we will config ODBC driver for that data file.
- Open "Control Panel". Go to "Start", and click menu "Control Panel".
- Click "Administrative Tools".
- Click "Data Sources (ODBC)".
- In "ODBC Data Source Administrator", click tab "System DSN".
- Click button "Add..." on the right side of the form. view image
- In "Create New Data Source" form, select "Driver do Microsoft Access (*.mdb)", and click "Finish" button.
view image
- In "ODBC Microsoft Access Setup" form, fill "Data Source Name" as "BarcodeDataSource", then click "Select..." button.
view image
- In "Select Database" form, go to your downloaded package, and select "BarcodeDemoData.mdb" file, and click "OK" button.
view image
- In "ODBC Microsoft Access Setup" form, click "OK" button.
- Now you can find new entry in "System Data Sources: " section.
view image
click "OK" button to close it.
3. Deploy and Install Barcode Library
- Copy BarcodeLib.Barcode.ReportingService05.dll, BarcodeLib.Barcode.ReportingService05CRI.dll to Visual Studio private assemblies directory (by default C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies).
- Copy BarcodeLib.Barcode.ReportingService05.dll, BarcodeLib.Barcode.ReportingService05CRI.dll to Microsoft SQL Server Reporting Services bin directory (by default C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin).
- Edit rsreportserver.config file under "C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer".
<Configuration>
...
<Extensions>
...
<ReportItems>
<ReportItem Name="LinearBarcodeControl2005" Type="BarcodeLib.Barcode.ReportingService05CRI.LinearReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="DataMatrixBarcodeControl2005" Type="BarcodeLib.Barcode.ReportingService05CRI.DataMatrixReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="PDF417BarcodeControl2005" Type="BarcodeLib.Barcode.ReportingService05CRI.PDF417ReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="QRCodeBarcodeControl2005" Type="BarcodeLib.Barcode.ReportingService05CRI.QRCodeReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
</ReportItems>
</Extensions>
</Configuration>
- Edit rssrvpolicy.config under the same folder with rsreportserver.config.
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Description="This code group grants BarcodeLib.Barcode.ReportingService05CRI.dll Full Trust permission. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\
bin\BarcodeLib.Barcode.ReportingService05CRI.dll" />
</CodeGroup>
- Edit rsreportdesigner.config under "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies".
<ReportItems>
<ReportItem Name="LinearBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05CRI.LinearReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="DataMatrixBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05CRI.DataMatrixReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="PDF417BarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05CRI.PDF417ReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
<ReportItem Name="QRCodeBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05CRI.QRCodeReportServiceCRI, BarcodeLib.Barcode.ReportingService05CRI" />
</ReportItems>
<ReportItemDesigner>
<ReportItem Name="LinearBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05.LinearReportService, BarcodeLib.Barcode.ReportingService05" />
<ReportItem Name="DataMatrixBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05.DataMatrixReportService, BarcodeLib.Barcode.ReportingService05" />
<ReportItem Name="PDF417BarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05.PDF417ReportService, BarcodeLib.Barcode.ReportingService05" />
<ReportItem Name="QRCodeBarcodeControl2005"
Type="BarcodeLib.Barcode.ReportingService05.QRCodeReportService, BarcodeLib.Barcode.ReportingService05" />
</ReportItemDesigner>
4. Create Barcode Image in your Reporting Project
- Create a report: Select File | New | Project from the Visual Studio .NET 2005 IDE menu.
In the New Project dialog, highlight Business Intelligence Projects in the Project Types box and Report Server Project Wizard in the Templates box.
Name the sample report appropriately in the Name box. Click OK.
view image
- In "Report Wizard" form, keyin name as "BarcodeDemoData", select type as "ODBC", and click "Edit.." button.
view image
- In "Connection Properties" form, select "use user or system data source name:" as "BarcodeDataSource", and click "OK" button.
view image
- In "Report Wizard" form, click "Next" button.
- Type in "SELECT * FROM Customer;" in "Query String:" field. Click "Next".
view image
- Select report type form, select "Tabular" as default. Click "Finish".
- In report designer panel, add a new column "Barcode" to the table, by right click column "Customer" header, and select "Insert Column to the right" menu.
view image
- For the new column "Barcode", set name as "Barcode". Add Reporting Services Barcode Controls to Toolbox and drop "LinearBarcodeControl2005" to the data section.
view image
- Set "BarcodeData" property to "=Fields!CustomerId.Value".
view image
- You can preview the report by click "Preview" tab.
view image
5. Property Settings for Each Barcode Types
Copyright BarcodeLib.com. All rights reserved.
|
|