SSRS Report Render report in PDF Via URL

余生颓废 提交于 2019-12-31 04:35:38

问题


I have an SSRS2016 Report that I'm able to connect to in the browser: http://vmbksa69901mcz/reports_ssrs1d/report/DAS/CDO_Suite/AccruedInterestRpt

But I want to be able to export to pdf by the url. This article states that this is possible: https://docs.microsoft.com/en-us/sql/reporting-services/export-a-report-using-url-access

So, when I try to put in this url: http://vmbksa69901mcz/reports_ssrs1d?/DAS/CDO_Suite/AccruedInterestRpt&rs:Format=PDF

It does not work.. It just brings me to the home page of the SSRS Site, and changes the url to: http://vmbksa69901mcz/reports_ssrs1d/browse/

I don't see what I'm doing wrong here.


回答1:


When you use a URL to pass commands you need to use the Web Service URL reportserver path in the URL not the web portals URL.

If you run the Reporting Services Configuration Manager and look under "Web Service URL" you see a different address.

By default the web portal (SSRS home page as you called it) will be at http://myServer/Reports

But the Web Service URL by default is http://myServer/Reportserver




回答2:


Adding on to @Alan's answer, my report was for exporting to excel :

A report with url : http://myservername/Reports/report/myserverSSRSUpgrade/PCM%20Allocation%20Report?DateFrom=04%2F01%2F2018&DateTo=04%2F30%2F2018&ParentID=46416&rs:Format=EXCELOPENXML

gets converted to

http://myservername/ReportServer?%2fmyserverSSRSUpgrade%2fPCM+Allocation+Report&DateFrom=04%2F01%2F2018&DateTo=04%2F30%2F2018&ParentID=46416&rs:Command=Render&rs:Format=EXCELOPENXML

Have a close look at the placement of ? character in both the query strings.



来源:https://stackoverflow.com/questions/47705408/ssrs-report-render-report-in-pdf-via-url

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