Passing URL report parameters to Reports in SharePoint Document Library in SSRS 2008 & R2

Passing URL report parameters directly to a report in a SharePoint Document Library is enabled in the SQL Server Reporting Services 2008 Integration with SharePoint Add-in.

Why? Key intent is to allow specifying non-default report parameter values when rendering of a report in full-page view in SharePoint.

How do you use this feature? Simply add-on the URL report parameters onto the URL displayed in SharePoint when viewing a report in full page view.

Examples: Here are examples using the Adventureworks sample reports assumed to be stored in SharePoint document library: https://<SharePoint_site>/Reports/ReportsLibrary

· Render the AdventureWorks "Employee Sales Summary" report for 'Syed Abbas' for 'January' / '2004' with ReportViewer Toolbar showing pagination only: https://<SharePoint_site>/Reports/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Reports/ReportsLibrary/Employee%20Sales%20Summary.rdl &rv:ToolBar=Navigation&rp:EmpID=288&rp:ReportMonth=1&rp:ReportYear=2004

· Render the AdventureWorks 'Product Catalog' report with the Document Map Area collapsed and no Header Area: https://<SharePoint_site>/Reports/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Reports/ReportsLibrary/Product%20Catalog.rdl &rv:HeaderArea=None&rv:DocMapMode=Collapsed

ReportViewer parameters for controlling full-page report rendering

ReportViewer Parameter

Description

Values

rv:HeaderArea

Control how the ReportViewer web part’s header is displayed in full-page view.

Full, None.

Default: Full

rv:ToolBar

Control how the ReportViewer web part’s toolbar is displayed in full-page view.

Full, Navigation, None.

Default: Full

rv:ParamMode

Control how the ReportViewer web part’s header is displayed in full-page view.

Full, Collapsed, Hidden.

Default: Full

rv:AsyncRender

Control whether the report is rendered asynchronously or synchronously.

true, false.Default: true

rv:DocMapAreaWidth

Control the display width in pixels of the ReportViewer web part’s Document Map area.

Non-negative integer

rv:DocMapMode

Control the display of the Document Map area of a report.

Displayed, Collapsed, Hidden.Default: Dislayed

SQL Server Reporting Services 2008 R2

In the Report Viewer that ships with the SSRS 2008 R2 Add-in for SharePoint the following new Report Viewer parameters are added:

 

ReportViewer Parameter

Description

Values

rv:DockToolBar

Controls whether the ReportViewer web part’s toolbar is docked to the top or bottom.

Top, Bottom.

Default: Top

rv:ToolBarItemsDisplayMode

Controls turning of or on specific parts of the ReportViewer web part’s toolbar. This is an enumeration field eg. For no Actions menu rv:ToolBarItemsDisplayMode= 63 (or 0x3F); For all of Actions menu only rv:ToolBarItemsDisplayMode= 960 (or 0x3C0)

Back= 1, (0x1)

Find= 2, (0x2)

Page Navigation=4, (0x4)

Refresh= 8, (0x8)

Zoom= 16, (0x10)

AtomFeed= 32, (0x20)

Actions Menu Print= 64, (0x40)

Actions Menu Export= 128, (0x80)

Actions Menu ReportBuilder= 256,(0x100)

Actions Menu Subscribe = 512, (0x200)

Default: -1