Pro SQL Server 2012 Reporting Services

(sharon) #1

CHAPTER 9  RENDERING REPORTS FROM .NET APPLICATIONS


So, add a GetParameters form to your project by selecting Project ➤ Add Windows Form. Name the
form GetParameters.cs and modify the title text of the form to Parameters. Onto this form, add two
controls from the Toolbox; add a FlowLayoutPanel control named parameterPanel from the Containers
section, and add one button control named buttonOK in the button properties window. Then set the text
property for the button to OK in the button properties window. When you’re done, the form should look
like Figure 9-7.

Figure 9-7. SSRS Viewer RVC GetParameters form

You now need to add a reference to the SSRS 2012 Web service to your project. You do this by
selecting Project ➤ Add Service Reference or by right clicking the Service References in the Solution
Explorer and selecting Add Service Reference. When the dialog box appears click the Advanced button at
the bottom of the form. On this next form, click the Add Web Reference button. From here, enter the
following URL:
http://localhost/reportserver/reportservice2010.asmx

Substitute the name of your server for localhost, if need be. Then click the Go button, which is the
right arrow icon. You’ll see a dialog box similar to Figure 9-8.
Free download pdf