Programmatically add subscription to SSRS reports

家住魔仙堡 提交于 2019-12-23 01:53:07

问题


On my SSRS server I have folder structure like

  • folder1
    • subfolder1
      • report1
    • report2
  • folder2
    • some_other_report2
    • report3
  • folder3
    • report4

I want to that these reports should be copied to client machine according to the same directory structure at a given schedule. I know this can be done by individually adding subscription to each report. But I was looking for a way so that I can programmatically ( using scripting or some tool) add subscription to all the report at one go. Also, if possible, it can be used for other clients as well in the future.

PS: I have searched on SO but the question appears to be old and does not solve my purpose either.


回答1:


I believe it can be done using the SSRS web services the following steps are how I'd do it (sorry no time to code it for you):

  1. After getting a reference to the web service client, invoke ListChildren, supplying the recursive parameter to walk the directory structure.
  2. At each report node, call the CreateSubscription method, with appropriate parameters to dump to files.


来源:https://stackoverflow.com/questions/25260680/programmatically-add-subscription-to-ssrs-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!