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.