Passing Parameters in URL to view a SSRS Report

September 26, 2008

I was having issues with passing parameters to SSRS and here is what I learnt.

I hope this helps some one else and saves some time.

Important thing to note here is SSRS has two Report Application Pools

and two report virtual sites (Check Under Default website in Server you will find Reports and ReportServer sites)

 

 -Reports is the portal (Report Manager).
-ReportServer is the asp.net application that is Reporting Services.

 

Reports

When we use Reports the report comes up in SSRS page but no parameters are passed in.

 

e.g. http://Server/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fPrint+Full+USER+Report

 

Reports Server
Next, when you do this with the Report Server, the report opens up. Note: Parameter is case sensitive to the way it is in the report

 

e.g. http://Server/ReportServer/?%2fReports%2fPrint+Full+ USR+Report
&rs:Command=Render&UsrID=12345&rc:Parameters=false&rc:Toolbar=false

 Example 1
Report : ErrorStatistics  
Report Parameters: DateFrom, DateTo, SubmissionID, InsCode
 
Case 1 : No Parameters passed : User needs to enter
http://Server/ReportServer/?%2fReports%2fErrorStatistics
Note: In Server we have ErrorStatistics Report in the Reports folder which is denoted by 
%2fReports%2f
 
Case 2 : With parameters Passed via URL aspx direct all
http://Server/ReportServer/?%2fReports%2fErrorStatistics&rs:Command=Render&
DateFrom=08/20/2008&DateTo=09/20/2008&SubmissionID=&InsurerCode=
 
Case 3 : With parameters Hidden
http://Server/ReportServer/?%2fReports%2fErrorStatistics &rs:Command=Render&DateFrom=08/20/2008
&DateTo=09/20/2008&SubmissionID=&InsurerCode=&rc:Parameters=false
 
Case 4 : With parameters Hidden and No tool bar
http://Server/ReportServer/?%2fReports%2fErrorStatistics&rs:Command=Render&DateFrom=08/20/2008
&DateTo=09/20/2008&SubmissionID=&InsurerCode=
&rc:Parameters=false&rc:Toolbar=false
 
Case 5 : Direct Open Report in PDF
http://Server/ReportServer/?%2fReports%2fErrorStatistics&rs:Command=Render&DateFrom=08/20/2008&
DateTo=09/20/2008&SubmissionID=&InsurerCode=
&rc:Parameters=false&rc:Toolbar=false&rs:Format=PDF 
 
Case 6 : Direct Open Report in Excel
http://Server/ReportServer/?%2fReports%2fErrorStatistics&rs:Command=Render&DateFrom=
08/20/2008&DateTo=09/20/2008&SubmissionID=
&InsurerCode=&rc:Parameters=false&rc:Toolbar=false&rs:Format=Excel
 
Example 2
Report : Print Full USER Details
Report Parameters: UserID
http://Server/ReportServer/?%2fReports%2fPrint+Full+USR+Report&rs:Command=Render
&UsrID=12345&rc:Parameters=false&rc:Toolbar=false
 
 
References:
 
 
Advertisements

One Response to “Passing Parameters in URL to view a SSRS Report”

  1. Reddy said

    Thanks Taposh..

    Saved me some time..

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: