Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 9  RENDERING REPORTS FROM .NET APPLICATIONS

create a URL that contains all the information necessary to run the report.
Finally, you’ll use this URL with the embedded Web browser to render the
report with user-entered report parameters and rendering commands.

Report Viewer control, server-side mode: Use the Report Viewer control to
render the same report using the control’s server-side mode.

Report Viewer control, local rendering: Use the Report Viewer control and a
locally populated dataset to render a report locally without an SSRS report
server.

Report Viewer control in an ASP.NET application: Use the Report Viewer control
and render a server-side report. We will make use of the Web service to retrieve
a list of reports to choose from.

Before you run the included examples, make sure to read the ReadMe.htm. It is located in a file in
the samples root folder. If you have the code open in Visual Studio, it will be under the Solution Items
folder. It contains setup and configuration steps that are required before running the examples.


Implementing URL Access

In this section, we’ll show you how to build a URL that accesses the desired reports on the report server
and passes the appropriate parameters to the report.
The syntax for the entire URL breaks down into two parts. The first part specifies the path to the
report file, and the second specifies the parameters. The full URL syntax is as follows:


http://server/virtualroot?[/pathinfo]&prefix:param=value [&prefix:param=value]...n]


The syntax for an SSRS installation in SharePoint integration mode will resemble:

http://server/subSiteName/_vti_bin/reportserver?[/pathinfo]&prefix:param=value
[&prefix:param=value]...n]


Table 9-1 describes each component of the URL.

Table 9-1. URL Access Parameters


Parameter Description Supported Values


server Specifies the name of the SSRS 2012 Web server None


subSiteName The sub site of SharePoint that contains the integrated
SSRS installation


None

virtualroot Specifies the virtual root of the SSRS 2008 Web service None


? Separates the application virtual root from the parameters None


[/pathinfo] Specifies the optional path to a folder containing the report None


& Separates individual parameters None

Free download pdf