简体   繁体   English

使用 powershell 从 SQL 2014 导出 SSRS 报告

[英]Export SSRS report from SQL 2014 using powershell

I want to automate the generation of a report from SSRS, export the report to csv and then use this data elsewhere.我想自动从 SSRS 生成报告,将报告导出到 csv,然后在其他地方使用这些数据。 I have done some research and it appears that newer version of SSRS has exposed API to facilitate this.我做了一些研究,似乎较新版本的 SSRS 已经暴露了 API 来促进这一点。 I would like to know if its possible to get the output of a SSRS report in csv using powershell or other methods.我想知道是否有可能使用 powershell 或其他方法在 csv 中获得 SSRS 报告的 output 或其他方法。

The best way to automate report generation is to set a report subscription in SSRS which will run the report on a user-defined schedule.自动生成报告的最佳方法是在 SSRS 中设置报告订阅,它将按照用户定义的计划运行报告。 You can define the output format (CSV in your case), report parameters, and an output location.您可以定义 output 格式(在您的情况下为 CSV)、报告参数和 output 位置。

The easiest way to create a report subscription is through the Reporting Services web portal.创建报表订阅的最简单方法是通过 Reporting Services web 门户。

PowerShell does have a cmdlet New-RsSubscription but you can't create a data-driven subscription this way. PowerShell 确实有一个 cmdlet New-RsSubscription但您不能通过这种方式创建数据驱动订阅。

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

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