【发布时间】:2010-07-21 06:06:11
【问题描述】:
我正在尝试在 c# 中为用户枚举报告服务的报告。
我该怎么做?是否有我应该使用的 Web 服务调用,或者我应该只获取从 http://localhost/ReportServer/lists.asmx 返回的 html 并将其分开?
第二个选项听起来有点像 hack。肯定有更好的方法吗?
【问题讨论】:
标签: c# api reporting-services
我正在尝试在 c# 中为用户枚举报告服务的报告。
我该怎么做?是否有我应该使用的 Web 服务调用,或者我应该只获取从 http://localhost/ReportServer/lists.asmx 返回的 html 并将其分开?
第二个选项听起来有点像 hack。肯定有更好的方法吗?
【问题讨论】:
标签: c# api reporting-services
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
【讨论】: