Page Viewer is an out-of-box SharePoint web part that functions as a placeholder for web pages, folders and files that reside usually outside the SharePoint environment. One such use of Page Viewer is to display a Reporting Service report which is not integrated with SharePoint. This means with a little bit on tinkering Page Viewer can be effectively converted into a Report Viewer. (Shown in Figure 1)
The key to achieve this is to specify the Page Viewer’s URL in URL Access format of Reporting Services. A simplified syntax for URL access looks something like this:http://ReportServer/VirtualPath?/ReportFolder/ReportName(without.rdl extension)&rs:Command=CommandName&rc: Command =CommandValue&ReportParameterName1=Value1&ReportParameterName2=value2&… ReportParameterNameN=valueN
Where, the prefix rc: denotes a client device command (usually for html viewer) and rs: denotes a server command. For more details on URL Access, check-out this link http://msdn.microsoft.com/en-us/library/ms153586.aspx
For this illustration, I’m using AdventureWorks report Product Line Sales.rdl with the following information.
|Report Name||Product Line Sales.rdl|
|rc: (display toolbar with parameters collapsed)||rc:Toolbar=True&rc:Parameters=Collapsed|
|Report parameters, Product Category=Clothing, SubCategory=Vests, Start Date =01-jul-03,End Date=30-jun-04||ProductCategory=3&ProductSubcategory=25&StartDate=01-Jul-2003&EndDate=30-Jun-2004|
With the above information, the Report URL can be built as shown below:
http://bennyaustin/ReportServer?/AdventureWorks/Product Line Sales&rs:Command=Render&rc:Toolbar=True&rc:Parameters=Collapsed&ProductCategory=3&ProductSubcategory=25&StartDate=01-Jul-2003&EndDate=30-Jun-2004
and applied to the Page Viewer’s property as shown below in Figure2 .
In this example, the Page Viewer almost fits the entire page. To achieve this I’m resizing the web zone using the technique described in Re-Sizing Web Zone in SharePoint Dashboards.
Using Page Viewer as Report Viewer provides an effective alternative to display reports when your report server is not integrated with SharePoint. In this case, the report permission is still determined by the Report Server and not by SharePoint.
5 thoughts on “Using Page Viewer Web Part to Display Reporting Services Reports in SharePoint”
Very useful, thanks. Just what I was looking for.
How can I set the Page Viewer’s URL at Run Time.
Some thing like based on some selection i want to open different reports in the page viewer webpart(but only one report at one point of time).
Thanks in Advance
Prashanth, you will have to create a custom web part to do that.
Hi. Nice tweak, simple and effective, but how can we pass parameters into the report *dynamically*? Using filter webparts, for instance?
Hugo, in the report url if you set rc:Parameters=True (instead of collapsed) then the report’s parameter area is displayed and from there you can dynamically change the report parameters.
http://bennyaustin/ReportServer?/AdventureWorks/Product Line Sales&rs:Command=Render&rc:Toolbar=True&rc:Parameters=True&ProductCategory=3&ProductSubcategory=25&StartDate=01-Jul-2003&EndDate=30-Jun-2004