Scenario
We have a financial report that lives in a SharePoint Report library. The report takes a parameter named requestID . The report needs to be rendered as a PDF document.
When the developer constructed the URL, he used the RSViewerPage.aspx as follows:
http://sp2013/sites/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/reports/FinancialSummary.rdl&rp:requestId=12345&rs:Format=PDF&rv:ParamMode=Collapsed
Problem
Using the RSViewerPage.aspx does not allow the generation of reports in other formats.
Solution
1. Instead of using the RSViewerPage.aspx use the report server address: http://sp2013/_vti_bin/ReportServer
2. Remove the rv:RelativeReportUrl and use an absolute URL:
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl
3. Pass any report parameters as themselves - remove the "rp:" :
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188
4. Add the reporting services command to render, format as PDF, and make sure the parameter pane is closed:
&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed
The fully transformed URL for our example is as follows:
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed
We have a financial report that lives in a SharePoint Report library. The report takes a parameter named requestID . The report needs to be rendered as a PDF document.
When the developer constructed the URL, he used the RSViewerPage.aspx as follows:
http://sp2013/sites/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/reports/FinancialSummary.rdl&rp:requestId=12345&rs:Format=PDF&rv:ParamMode=Collapsed
Problem
Using the RSViewerPage.aspx does not allow the generation of reports in other formats.
Solution
1. Instead of using the RSViewerPage.aspx use the report server address: http://sp2013/_vti_bin/ReportServer
2. Remove the rv:RelativeReportUrl and use an absolute URL:
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl
3. Pass any report parameters as themselves - remove the "rp:" :
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188
4. Add the reporting services command to render, format as PDF, and make sure the parameter pane is closed:
&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed
The fully transformed URL for our example is as follows:
http://sp2013/_vti_bin/ReportServer?http://sp2013/sites/reports/FinancialSummary.rdl&requestId=22188&rs:Command=Render&rs:Format=PDF&rv:ParamMode=Collapsed
Brilliant saved me heaps of time. Good things is this covers all necessary points.
ReplyDeleteVery helpful - this was just what I needed.
ReplyDeleteThanks Steve, a great and succinct explanation.
ReplyDeleteGreat and succinct explanation, thanks!
ReplyDelete