DOCX

SSRS Advanced Training_XML

By Roy Boyd,2014-10-03 09:11
14 views 0
SSRS Advanced Training_XML

    Lesson 1: Defining a Report Dataset for a Reporting Services Web Service

    ; Obtain namespace information for Report Server Web service http://localhost:90/reportserver/reportservice2005.asmx?wsdl

    ; Create a report

    ; Set Data Source(XML)

    ; Query String:

    

    http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/ListC

    hildren

    

    

    ; Parameters on the ListChildren method that specify where to

    start in the Report Server folder hierarchy and whether to

    include all nested folders

    o Item

    o Recursive

; Run

    Lesson 2: Defining a Report Dataset for an ADO.NET DataSet from a Web Service

    ; Create web service

    ; Create new web application

    ; Code

    using System.Data;

    using System.Data.SqlClient;

    [WebMethod]

     public DataSet GetEmployeeManagers(String EmployeeID)

     {

     Int32 val = Int32.Parse(EmployeeID);

     DataSet ds = new DataSet("Results");

     try

     {

     if (val < 1)

     val = 1;

     else if (val > 290)

     val = 290;

     SqlDataAdapter da = new SqlDataAdapter(@"uspGetEmployeeManagers "

     + val.ToString(),

     @"Data Source=localhost; Initial Catalog=AdventureWorks; "

     +@"Integrated Security=true");

     da.Fill(ds);

     }

     catch (Exception e)

     {

     throw;

     }

     return ds;

     }

    ; Build & publish

    ; Test:

    o http://localhost:90/MyWebService/Service.asmx

; Grant permission in store procedure

Report this document

For any questions or suggestions please email
cust-service@docsford.com