代码之家  ›  专栏  ›  技术社区  ›  WOPR

如何获取reporting services实例上可用的报表列表[已关闭]

  •  11
  • WOPR  · 技术社区  · 14 年前

    我试图在c#中列举一个用户在reportingservices上的报告。

    http://localhost/ReportServer/lists.asmx 把它拆开?

    第二种选择听起来有点像黑客。当然有更好的办法吗?

    1 回复  |  直到 14 年前
        1
  •  31
  •   Glenn Slaven    14 年前

    SSRS有一个完整的SOAP API,您可以在这里看到相关信息: http://technet.microsoft.com/en-us/library/ms155376.aspx

    根据上述文章:

       // Create a Web service proxy object and set credentials
       ReportingService2005 rs = new ReportingService2005();
       rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
    
       // Return a list of catalog items in the report server database
       CatalogItem[] items = rs.ListChildren("/", true);
    
       // For each report, display the path of the report in a Listbox
       foreach(CatalogItem ci in items)
       {
          if (ci.Type == ItemTypeEnum.Report)
             catalogListBox.Items.Add(ci.Path);
       }
    

    这里也有完整的教程: http://technet.microsoft.com/en-us/library/ms169926.aspx