CHAPTER 9 RENDERING REPORTS FROM .NET APPLICATIONS
Figure 9-8. Adding an SSRS 2008 Web service reference
In the Web Reference Name textbox, enter SSRSWebService, which is the name by which you’ll
refer to your Web service in your code. From here, click the Add Reference button to finalize the
reference addition.
Once this dialog box is closed, you will add the following using statement to the top of your code in
the GetParameters class file. Note that if your project name is different from SSRS Viewer RVC, you
should change the reference to reflect the name of your project.
using SSRS_Viewer_RVC.SSRSWebService;
Now you can reference the methods and properties exposed by the Web service much more easily
because you won’t have to enter the fully qualified namespace. Also, add the following other directives
underneath the one you just added:
using System.Web.Services.Protocols;
using System.Collections;
Doing this will allow you to access the members of these namespaces without needing to type the
full namespace each time you use a method or property from that namespace.
Because you’ll use this form as a dialog box to display the report parameters and their possible
values, and allow the user to select them, you need a way to communicate between the main form and
this newly created GetParameters form. We will set that communication up in the next section.