我有一个包含大约15个报告的文件夹,这些是Report Server报告。单独运行每个报告需要一段时间,所以我希望它们一起运行。所以,我希望能够以某种方式运行此文件夹中的所有报告,这可能吗?
答案 0 :(得分:0)
这是一个含糊不清的问题。让我解释。你具体问什么?
问:你能同时运行多个报告吗? 答:是的,有几种方法可以实现这一目标。 1.您可以使用SQL代理 2.将批处理文件与任务计划程序一起使用 3.使用SSIS包并使用代理在特定时间运行它们......等等......希望其中一个报告不依赖于另一个报告,您需要考虑的另一个问题是您将如何努力攻击SSRS或SQL服务器。一次运行它们可能需要一次超过一个。取决于SQL Server的带宽以及在每个进程中将锁定哪些表。
您可能想在问题中提供更多细节......
答案 1 :(得分:0)
I would recommend an SSIS package, especially as it also one of the options presented by @Michael that can email the Excel workbook too which you mentioned in an earlier comment.
The following resource covers quite well the execution and export of an SSRS report using SSIS, including code you will need as a starting point: Executing an SSRS Report from an SSIS Package.
You could save some time in coding the solution by using the following custom Task that can be integrated into SSIS: SSIS ReportGenerator Task.
There is one problem in your requirements though which is merging reports into one Excel workbook where I assume you want separate sheets for each report within the same workbook?
Reporting Services can use multiple worksheets (to divide a report up into pages a.k.a pagination) but only for a single report; it can't merge reports into one Excel file. This can be accomplished with custom code however. There's a somewhat basic example here: Merging workbooks into a master workbook with separate sheet for each file.
答案 2 :(得分:0)
一次运行所有报告的一种方法是向所有报告添加订阅,并在所有报告中设置相同的订阅开始时间。会发生什么是一旦开始时间到达,所有报告将同时运行,并将在共享位置生成excel / pdf(任何格式指定)文件。