Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 8  DEPLOYING REPORTS


// We are going to use the name of the RDL file // as the name of our report string
reportName =
Path.GetFileNameWithoutExtension(openFileDialog.FileName);

you could do the following:

// We are going to read the contents of textbox reportTitle
// as the name of our report
string reportName = reportTitle.text


  • You could allow the user to set other properties of the report, such as adding a
    description that will be displayed in Report Manager in the detailed list view. For
    example, you could add a Description property:


Property[] itemProps = new Property[1];
Property itemProp = new Property();
itemProp.Name = "Description";
itemProp.Value = "Employee Service Cost by Patient";
itemProps[0] = itemProp;


  • You could then change your call to CreateReport from the following code:


rs.CreateCatalogItem("Report", reportName, pathName, true, definition, null, out warnings);

to the following code instead:

rs.CreateCatalogItem("Report", reportName, pathName, true, definition, itemProps, out
warnings);

With Report Server Web service, there isn’t much you can’t do. For more details on additional
properties that you can set on reports or to find out more about the SOAP API, see the SQL Server 2012
Books Online. We will be diving into the web service even more in the next chapter.

Summary

In this chapter, we discussed and demonstrated how to use the Report Builder 3.0 utility, the rs.exe
application, and BIDS/Visual Studio to deploy reports to your SSRS 2012 server. Additionally, you used
the SOAP APIs through the Report Server Web service to list the folders on the selected server and then
allowed the user to select an RDL file and upload it to the user-specified folder on the selected report
server using both a Visual Studio C# windows application and the rs.exe utility. We also examined some
of the additional features you could provide the application by using a few of the many methods and
properties exposed by the SSRS 2012 Web service.
Free download pdf