繁体   English   中英

简单的SQL Reporting Services问题

[英]Simple SQL Reporting Services Question

我只是在编写一个项目的可行性研究,在深入研究之前,我可以得到一个.net程序来获取SQL Reporting Services中服务器的报告列表吗?

换句话说,如果有人添加了新报告,我们希望它显示在列表中。 另外,您可以通过某种枚举获取有关报告的详细信息吗?

您可以通过Reporting Services Web服务访问所有这些数据。 您必须首先创建一个代理对象,但是一旦完成,获取报告列表就很简单。 例如:

ReportingService2005 service = new ReportingService2005();
service.Url = ConfigurationManager.AppSettings["ReportingServicesURL"];
service.UseDefaultCredentials = true;
CatalogItem[] items = service.ListChildren(reportingServicesfolderPath, false);
List<string> reports = new List<string>(items.Length);
foreach (var item in items)
{
    reports.Add(item.Name);
}
return reports;

Reporting Services具有SOAP API,因此您可以通过该API检索报告列表,但我认为直接进入数据库会更容易。 ReportServer数据库中的Catalog表包含每个报告的列表。 您甚至可以从那里链接到ExecutionLog表,以查明该表何时运行(尽管该表似乎是三个月左右的滑动窗口-您将没有比该表更早的执行细节)。

建议您阅读将Reporting Services集成到应用程序中 毕竟Reporting Service是WebService端点,因此您可以使用SOAP WebService端点或HTTP调用。 除此之外,还有Reporting Services类库 ,最后是Reporting Services WMI提供程序 Afaik上面的每个库都允许您执行所要求的操作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM