【问题标题】:How do I get a list of the reports available on a reporting services instance [closed]如何获取报告服务实例上可用的报告列表[关闭]
【发布时间】:2010-07-21 06:06:11
【问题描述】:

我正在尝试在 c# 中为用户枚举报告服务的报告。

我该怎么做?是否有我应该使用的 Web 服务调用,或者我应该只获取从 http://localhost/ReportServer/lists.asmx 返回的 html 并将其分开?

第二个选项听起来有点像 hack。肯定有更好的方法吗?

【问题讨论】:

    标签: c# api reporting-services


    【解决方案1】:

    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

    【讨论】:

    • 酷。那么,如何获得对 ReportServices 的引用?我必须在编译时指定一个 reportservices 实例吗? (对不起,我在这方面有点菜鸟)
    • 我刚刚在 technet 网站上添加了一个完整教程的链接,它应该可以很好地介绍如何使用它
    猜你喜欢
    • 1970-01-01
    • 2012-06-09
    • 2012-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多