SharePoint – Trigger a Report by using a URL, Parameters and More …

It seems easy to do, but when you have SSRS running in SharePoint Integrated mode it is a bit different.

This is how to get you going.

http://YourSite/sites/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/sites/Reports/ MyReport.rdl&rp:CaseNumber=27&rv:ParamMode=Collapsed

The trick is to add a parameter using the prefix “rp:” for the parameter (After the .rdl report string, remove all the rest).

Adding the prefix “rv:” gives you the option to hide or collapse the parameter pane.

More options are explained here :

http://blogs.msdn.com/b/prash/archive/2009/01/21/passing-url-report-parameters-to-reports-in-sharepoint-document-library-in-ssrs-2008.aspx

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: Displayed
SQL Server Reporting Services 2008 R2 Extra Options available for this version
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

Example to hide Action menu items :

Add this  : &rv:ToolBarItemsDisplayMode=223

image

Why 223? You have to make the sum of the values of the parts you want to include in the toolbar. The values are shown in the reference table.

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: