次の方法で共有


Hiding parameter area when viewing reports

image

When rendering reports, oftentimes the application would like to minimize as much of the non-report area of the viewer control as possible.  This is easily accomplished when rendering the report through the built-in report viewer control hosted in the ReportServer web site (https://servername/reportserver). 

There are two parameters which control the rendering of the viewer control area:

  • rc:Parameters
  • rc:Toolbar

rc:Parameters can have 3 values:

On Displays the parameter area as in the screenshot above.
Off Completely hides the parameter area. 
Collapsed Renders the parameter area initially minimized, so a user can expand it if they need to view/change the parameters for a report.

Here is an example URL which demonstrates rendering a report with rc:Parameters=Collapsed:

https://servername/ReportServer?%2fSamples%2fSQL+2008+Samples%2fAdventureWorks2008+Sample+Reports%2fEmployee+Sales+Summary+2008&rs:Command=Render&rc:Parameters=Collapsed

The other way of hiding the parameter area is to render the report with rc:Toolbar=false.  For many applications though, there are side-effects of this approach which I don’t think are desireable.  These are:

  1. It disables the automatic ping-mechanism to keep the user’s report session alive.  This can lead to rsExecutionNotFound errors if the user leaves the page inactive for several minutes.
  2. It also removes the navigation (next page, find, etc…) UI.
  3. By default, it will cause every page of the report to be returned to the client.  For long reports, this is typically not desireable.

So if you are in a situation where you want to minimize the amount of extraneous UI initially presented to the user, while still allowing flexibility in having the end user change the parameter values, consider using rc:Collapsed=true when rendering the report.

Comments