Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / productivity / SharePoint

Working with SharePoint Report Server Using URL Parameters in SSRS 2008/2012 in SharePoint Mode - Part One

4.00/5 (1 vote)
26 Feb 2017CPOL 6.5K  
How to work with SharePoint Report Server using URL parameters in SSRS 2008/2012 in SharePoint mode

There is a slightly difference between the earlier SSRS report parameters and the NEW SSRS running in SharePoint server 2013.

URL parameters are slightly different from native mode and SharePoint Mode. This article is only about SharePoint mode parameters.

SSRS running on SharePoint has few parameter types and types are passing to SSRS engine using prefix.

Parameter TypePrefixNote
Report Viewer Controlrc:Report Server HTML controller
Report Serverrs:Report Server to process
Report Viewer Web Partrv:Web part parameters
Report Parametersrp:Report parameters

Most of the time, passing parameters to report is more frequently used than any other Passing the Reports as a URL Parameter.

Assume that we have created a Report with parameter interval and need to pass the values from the URL.

image

Let's see the attributes of the @interval parameter.

image

I have mentioned the visibility as visible but you can have it as Internal as well. Internal will not be visible to users for selection.

If you are running the report from SharePoint, it will have URL something like below:

http://www.myportal.com/_layouts/15/ReportServer/RSViewerPage.aspx? 
&rv:RelativeReportUrl=/ReporlLocation/myreport.rdl&rc:Parameters=Collapsed

Assume that you need to pass the parameter "interval" in URL. Thus, you need to append the following URL parameter.

rp:interval=cm

URL parameter has three sections:

Prefix - rp:
Parameter name - interval
Value - cm

So, your final URL will be something like follows:

http://www.myportal.com/_layouts/15/ReportServer/RSViewerPage.aspx? 
&rv:RelativeReportUrl=/ReporlLocation/myreport.rdl&rc:Parameters=Collapsed& rp:interval=cm

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)