SQL Server 2008 and the ReportViewer Controls
In August, we released SQL Server 2008 with a number of new features for Reporting Services. There have been questions lately about how this impacts the report viewer controls. The answer depends on whether you use server mode or local mode.
Server Mode
We spent a great deal of time making sure that the existing report viewer controls (both the Visual Studio 2005 and 2008 versions) are capable to rendering reports from a SQL Server 2008 Report Server. If you publish a report to the server (in any of the SQL 2000, 2005, or 2008 definition schemas), then point a report viewer control to that report, it will render it. There are, however, two limitations to viewing any report from the 2008 server in the existing viewer controls.
One of the new features of the report processing engine is that it now evaluates the report on demand. To the extent possible, the processing engine will only perform the calculations necessary to return the report page that has been requested by the client. A side effect of this approach is that the processing engine does not always know the actual page count of the report when rendering any given page. We added a new SOAP API to accommodate this so that clients can detect this condition and display an appropriate UI. But the existing report viewer controls use the old SOAP API. The old API always returns the actual page count, maintaining backwards compatibility. But this necessitates performing additional calculations and therefore does not take advantage of all of the performance improvements we made in SQL Server 2008. Other processing engine performance improvements are still used, so you will see benefits regardless of this limitation.
The second new feature that impacts the report viewer is the use of rich text. The new rich textbox allows you to specify multiple formats and actions in a single RDL textbox. But due to limitations in the rendering format used by the existing ReportViewer winforms control, only the first format in a rich textbox will be applied when displaying the report through the winforms viewer. Additionally, report actions (drillthoughs, bookmarks, and hyperlinks) will be ignored if they are applied to individual text runs rather than the textbox as a whole. These limitations do not apply to the ASP.Net report viewer.
Aside from these two limitations, all other new features of the report definition will work through the existing report viewer controls in server mode. You can use the new charts, gauges, tablix, and the new Word renderer for exporting, all without any updates to your client.
Local Mode
Local mode is a different story. When using local mode with the VS 2005 or VS 2008 viewer controls, you are using the same report processing engine that was shipped with SQL Server 2005. This engine does not understand the new report definition schema and attempting to load a report created with one of the new SQL Server 2008 authoring tools will result in this error:
The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.
Looking Forward
We are working on updated versions of both the winforms and ASP.Net report viewer controls to support the new report processing engine in local mode and therefore all of the new RDL features as well (new charts, tablix, rich text, etc). This upgrade should also remove the limitations described above for server mode. The current plan is to release the updated viewer controls with Visual Studio 2010. We are also adding lots of new features to the viewers, which I will be talking about more in the coming months. Disclaimer: Please be aware that while this is our current plan, it is always possible that plans change along the way.
Published Friday, December 05, 2008 7:40 PM by Brian Hartman
Brian Hartman's Report Viewer Blog : SQL Server 2008 and the ReportViewer Controls
See Also ...
SQL Server 2008 Books Online (December 2008)
Planning for Report Authoring and Report Deployment
New: 31 October 2008
SQL Server 2008 Reporting Services (SSRS) offers several approaches for authoring and deploying reports. This topic provides an overview of report definition support by SSRS components. A report definition is an XML file that is written in the Report Definition Language (RDL) or the Report Definition Language for Clients (RDLC). Each report definition conforms to a specific schema version that is included in the file.
RDL files are authored in Report Designer in Business Intelligence Development Studio in SSRS, Report Builder 1.0, or Report Builder 2.0. RDLC files are authored by using the ReportViewer controls that are included in Visual Studio 2005 and Visual Studio 2008.
Use this topic to help determine the following:
- Which report versions can be authored, published, and viewed on a SQL Server 2008 Reporting Services report server.
- Which authoring environments can create, deploy, and locally preview which report versions.
No comments:
Post a Comment