Report Management Web Service New in 2005 (ReportService2005.asmx)


Report Management Web Service New in 2005 (ReportService2005.asmx)

Previously in this chapter, you saw an example of the Report Execution web service ( ReportExecution2005.asmx ). Most of the report execution functionality is available using URL Access.

In contrast, only a few URL Access methods (such as ListChildren() ) are available from the Report Management web service ( ReportService2005.asmx ). Thus, the Report Management web service is often used in combination with the Report Execution web service, and sometimes in combination with URL Access, to get the most comprehensive access to SSRS.

To access the Report Management web service, you can follow the same steps used earlier to access the Report Execution web service:

1.
Add a web reference to the Report Management web service ( ReportService2005.asmx ).

2.
Name the proxy ReportService2005 .

3.
Add a reference to the proxy in the code (using EmbeddedReport.ReportExecution2005; ).

4.
Call Report Management web service methods.

The following is an example of a console application returning items stored on SSRS starting from the root " / " folder.

 static void Main(string[] args) {     //creates new Web service (proxy) and set its credentials     ReportingService2005 rs = new ReportingService2005();     rs.Credentials = System.Net.CredentialCache.DefaultCredentials;     try     {         CatalogItem[] items = rs.ListChildren("/", true);                  Console.Write("Item Path, Item Name, Item Type, MimeType");         foreach (CatalogItem ci in items)         {             Console.Write(ci.Path + "," + ci.Name + ","                                  + ci.Type + "," + ype + "\n");         }         return;      }      catch (SoapException e)      {          Console.Write(e.Message);      } } 

Valid items include DataSources , Folders , LinkedReports , Reports , Resources , and Unknown items.



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net