DCSIMG
SQL Reporting Services - Query Report Server - Zuker On Foundations

Zuker On Foundations

The realm of .NET (WPF, WCF and all around)
SQL Reporting Services - Query Report Server

It took me quite a while to find a proper example of how to communicate with SQL Reporting Services in order to execute a specific report, I though I might share it.

We have Report Server 2008 installed over SQL Server 2005.
I needed to extract data of a specific report in runtime (desired output in my case - XML).

I found 2 suitable ways of doing so:

1) Use ReportExecution2005 Service

SQL Reporting Services include the following:

ReportService2005 - A service which exposes the realm of the entire reports
ReportService2006 - Represents the SharePoint integration mode

ReportExecution2005 - A service used to execute reports - my main focus.

TalkWithWs() method in the attached project illustrates the use of the ReportExecution2005 service.

2) Use the Report Server ReportViewer page directly

This is a very easy way to extract the data.

I could extract any report's data through the ReportViewer page, E.g.
http://<Server>/<ReportServer Instance>/Pages/ReportViewer.aspx?%2fSandBox%2fadv_testforAmir&rs:Command=Render&rs:Format=xml

This will yield the XML data for the following report path: /SandBox/adv_testforAmir

Very clean and handy.

This mechanism also support parameters (through the QueryString)

The source code can be found here.

Published Thursday, January 15, 2009 3:25 PM by Amir Zuker

תגים:,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: