Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 8  DEPLOYING REPORTS


You now have a new data source and report deployed to your report server. The RSS file included in
the example code can be used as a starting point to script your own custom report project deployments.

Figure 8-11. Deploying a report and data source with the rs.exe utility

Using the Report Server Web Service

The method provided by SSRS 2012 for deploying reports programmatically is to use one of the Report
Server Web services using the SOAP API (which we will use again in Chapter 9 to write a report viewer).
In this section, we’ll look at deploying reports to SSRS 2012 by using a Windows Forms application that
simulates what customers need to do after they have an RDL file ready for deployment:


  • Select a report server to publish their report to.

  • Select from a displayed list of folders on that server to determine which folder on
    the server to publish the report to.

  • Browse to the RDL file that is to be uploaded from the local machine to their
    report server.


There are several web service endpoints available to you when dealing with SSRS 2012. The old
versions of each web service are still there for backward compatibility and have the ability to manage
either native or SharePoint mode installs separately. These are deprecated and it is advisable to upgrade
to the newest version, which allows you to control both types of installations from one web service. We
will be using the newest management web service in this example.
You will use the Report Server Web service to get a list of folders on the server and then upload the
report to the server. In this example, you’ll upload some of the reports created for the health-care
provider. In the health-care setting, it’s important to maintain strict control over the report folders and
their permissions on the server, so you won’t allow the users to create a new folder; they will only be
allowed to upload to the existing folders that they already have permission to use.
The CreateCatalogItem method of the Report Server Web service allows you to deploy the report to
the report server by creating a copy of the report on the server from an RDL file that you provide. This is
the same method as described in the previous section, “Using the rs.exe Utility.”
Free download pdf