Developing Matt

My Technical Journal

Calling Reports via URL take II

leave a comment »

Previously I had posted advice here on how to link to a report via url.  I have some more information for you to assist you (me) with this venture.  Some organizations choose to use IIS rather than use just the web service URL to enable the use of sharepoint as a UI.  Consequently the directory takes a funny look: 

Previously the link looked like this

http://SERVERNAME/ReportServer/?%DIRECTORYNAME%REPORTNAME&rs:Command=Render

However, if you enable viewing the report from sharepoint it has to be fed from IIS.  Therefore the DirectoryName becomes root website followed by the directory, etc.  Also, note, that SERVERNAME can be the servername but it IS the sqlserver name:

http://servername/ReportServer/?http://website/Directory/Reports/ReportName.rdl&rs:Command=Render

One thing to note, there is no way to go to the website directly.  You have to fully qualify the server name.  Confused yet?  If interested here is the configuration of the reports:

ReportServicesConfig

So here is the full range of possibilities and examples:

Render to PDF using HTML Report Viewer with Sharepoint Report
http://servername/ReportServer/?http://website/Directory/Reports/ReportName.rdl&rc:Parameters=false&Parameter=ParameterValue&rs:Format=PDF&rs:Command=Render

Render with SharePoint Viewer (nicer look than HTML)
http://website/Directory/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Directory/reports/ReportName.rdl&rv:ParamMode=Hidden&rp:Parameter=ParameterValue

Render Directly to PDF with HTML Viewer
http://servername/ReportServer/Pages/ReportViewer.aspx?http%3a%2f%2fwebsite%2fDirectory%2fReports%2fReportName.rdl&rs:Command=Render&rs:Format=PDF

Render using HTML Viewer
http://servername/ReportServer/Pages/ReportViewer.aspx?http://website/Directory/Reports/ReportName.rdl&rc:Parameters=false&rs:Command=Render&Parameter=ParameterValue

Thanks Chris for your assistance with this stuff!

Advertisements

Written by matt

November 30, 2011 at 4:23 pm

Posted in Report Services

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: