Wednesday, February 4, 2015

How to customize the sharepoint host report render from URL Access Paramenter

Today, My manager asked me to hide the report path that shown in the IE, after i use JavaScript to open the report in popup window.

here is my source code to open new windows

<a onclick='openNewWindow("https://mysharepointserver/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/reports/Reports%20Library/MyReport.rdl&amp;rs:Command=Render&amp;rc:StyleSheet=SP_Full")'  href="javascript:;">My Report</a>


https://mysharepointserver/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/reports/Reports%20Library/MyReport.rdl&amp;rs:Command=Render&amp;rc:StyleSheet=SP_Full

 will render the sharepoint host report in the new IE with breadcrumb navigation header shown.




we can use Report Viewer Web Part Commands to control the view.

please find the detail references  in MSDN

URL Access Parameter Reference

in my case i only need to add HeaderArea parameter to control the display of Header
I use value None  to hide the header.

https://mysharepointserver/reports/_layouts/15/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/reports/Reports%20Library/MyReport.rdl&amp;rs:Command=Render&amp;rc:StyleSheet=SP_Full&amp;rv:HeaderArea=None

No comments:

Post a Comment