Wednesday, August 31, 2005

Barcode in Reporting Services 2005 Local Mode

Some of our Barcode Professional for Reporting Services customers has asked about how to use it in Reporting Services 2005 Local Mode. Local mode in SSRS 2005 is a great feature which allows you to use all SSRS 2005 power and flexibility with your Windows as well as ASP.NET applications without a SQL Server 2005 license (it’ll be required if you use reports in Server Mode). In local mode you use the new ReportViewer controls included in VS.NET 2005 (Standard or grater) to render RDLC files. RDL (Report Definition Language) files are XML-based and they describe all about the report they represent. RDLC are the same RDL files but they only can be used in Local Mode.
In local mode you must tell to the ReportViewer control what RDLC file you want to show and the data source for it.
SSRS is so extensible that it allows you to develop .NET assemblies and then use them into your reports. Our barcode component is in fact a .NET assembly that renders barcode images.
If you use SSRS in Server mode, all .NET custom assemblies that use your report have to be registered in the report server policy configuration file (rssrvpolicy.config) but what happen if you use them in Local Mode?
Well, it’s a good question… In a first approximation to find a solution to this issue I reach a page that in theory explain how to “Configure the ReportViewer Control for Local Processing” but it does not mention anything related to custom assemblies. If you follow all the topics related to this last one you won’t find anything as well. At this point I was very tired but suddenly I saw the light :-)
I realize some links on the top of every page and after a pair of clicks I reach the LocalReport class. This class exposes a method called AddTrustedCodeModuleInCurrentAppDomain that solves the issue.

So if you want to use our Barcode assembly (or any custom .NET assembly) with SSRS 2005 in Local Mode in a Windows Forms app, you’ll have to call that method in the Load event of the form that holds the ReportViewer control. Sample code:

C#
this.reportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("Neodynamic.ReportingServices.Barcode,
Version=1.0.5000.0,Culture=neutral, PublicKeyToken=null
");

VB.NET
Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("Neodynamic.ReportingServices.Barcode,
Version=1.0.5000.0,Culture=neutral, PublicKeyToken=null
")

Currently, we’re updating our Barcode component for RS to be fully compliance with the new SSRS 2005 Report Items infrastructure but meanwhile you can use our current version in SSRS 2000 or 2005, too.

Saturday, August 27, 2005

Visual Fox Basic

According this, the next of the next version of Visual Basic (v9.0 codename Orcas) will gain some of the data-handling capabilities that long have been part of FoxPro. This will be without doubt a great enhancement for VB.NET and with all those changes that has affected VB for years and years, I guess that it could be a good moment to rename it as Visual Fox Basic :o) OTOH, will it be the end of Fox? We’ll see…

Friday, August 26, 2005

SQL Server Reporting Services Barcode solutions

A few months ago we launched our Barcode Professional .NET component for MS SQL Reporting Services (a.k.a. SSRS). Until that time, the only way to deliver barcode images into Reporting Services was using barcode fonts. IMHO Barcode Fonts are a good solution for some client-side scenarios like Windows Forms applications, but not for server-side applications like SSRS. For this reason we began our research over SSRS to see in what way we could integrate our barcode component into it.
SSRS is mainly based-on .NET Framework and our first thought was to develop a custom control for it but apparently SSRS 2000 was not designed to integrate third party controls/components. Thankfully “this limitation” has changed for the next version i.e. SSRS 2005.
But that does not demoralize our dev team and after a few days they found a way to deliver barcode images with SSRS and in that moment Barcode Professional for Reporting Services was born.
Barcode Professional .NET component for MS SQL Reporting Services
This barcode .NET-based solution allows to our customers to include barcode images into their reports with a lot of features such us Linear and 2D Barcode Symbologies, Image Rotation, Text color, export file format (PDF, Excel, etc) supported, and so on; all features that Barcode Font solution does not offer. We’ll continue supporting Reporting Services because it’s a great report solution and our dev team is already updating our Barcode component for the next version SSRS 2005. Finally, I’d like to share excellent news (at least for us). All our hard work was rewarded with our inclusion in the official Microsoft Reporting Services Partners Component website!!!