Reputation: 6941
I am using SSRS (2008R2) Url Access to render reports in a web application. I need to specify the format of the report, and am able to successfully do so using the rs:Format=
option, so long as the report doesn't have any required parameters that need to be specified.
If the report requires the user to enter a parameter, it fails. If I then remove the rs:Format
option from the URL, the report's parameter page will come up fine and if I make selections, the report will render.
My URL Access URL looks like this: https://www.imnottelling.com/ReportServer_SQL2008R2/Pages/ReportViewer.aspx?/AppReports/Cool+Report&rs:Command=Render&rc:LinkTarget=main
Note that the error message I receive when attempting this tells me that a parameter is missing, which varies, depending on the report that is attempted to run.
This leads me to believe that either (A) this is not supported or (B) I'm missing something in my URL.
Any help would be greatly appreciated.
Upvotes: 0
Views: 1249
Reputation: 13242
This should be 'as designed' I believe as the 'rs:' portion of the url is saying 'RenderState(something)'. If the report has REQUIRED parameters you have three choices:
Generally you just need to add the parameters to your rest uri like:
main root
http:// (servername)/ReportServer/Pages/ReportViewer.aspx?
directory (if you have one)
%2fTest%2f
itemname:
ComboWithParm
renderit:
&rs:Command=Render
parameters:
&Parm=HereIAmPassedInThroughAnUrl
All at once:
http:// (servername)/ReportServer/Pages/ReportViewer.aspx?%2fTest%2fComboWithParm&rs:Command=Render&Parm=HereIAm
If you are using a web application with .NET technologies and ASP.NET I believe you can use the report viewer object. Else you may be forced to deal with using the report url. I know I read a book by Brian Larson for SSRS 2008 and he had an example where you basically bind an HTML form and also use a select node in the form object to set properties of the service. If you were doing HTML natively this may be a good idea as well. It was similar to this:
<form id="frmRender" action="http:// (servername)/(pathtoreport)" method="post"
target="_self">
<H3>My Report Title</H3>
Render in the following format:<br/>
<Select ID="rs:Format" Name="rs.Format" size=1>
<Option Value="HTML4.0">HTML 4.0</Option>
<Option Value="IMAGE">TIFF IMAGE</Option>
</Select>
</form>
Upvotes: 0