SQLUNINTERRUPTED

I am just a medium, SQL Server the Goal

Adding a Reporting Services Web Reference to .Net application

In an earlier post, I had talked about adding a Reporting Services Proxy class using WSDL.exe. In this post, I would talking about adding a Reporting Services Web Service reference to your .Net Application.

As mentioned in the earlier post, SSRS web service provides interface for communication with the Report Server. In order to use the methods exposed by the Web Service, a reference to the Web Service needs to be added to the Visual Studio project. Depending on the requirement, a reference can be added for any of the reporting services endpoints.

  1. ReportService2005
  2. ReportService2006
  3. ReportExecution2005
  4. ReportService2010 (to be used with SSRS 2008 R2).

In order to add, a web service reference to your project, follow the steps provided below.

In solution explorer, right click on the project node and select “Add Service Reference”

image

On the Add Service Reference Window, click on Advanced. This would open the “Service Reference Setting” window. On the Service Reference Setting window, click on “Add Web Reference”.  On the Add Reference window, in the URL section, provide the complete asmx URL for the Reporting Service endpoint which needs to be used. For example, I would be using the ReportService2010 endpoint. Click on Go.

image

When you click on go, the web service reference would be resolved, and the methods available in the web service would be displayed.

In the Web Service Reference name, you can provide any name of your choice, and click on add reference. This would add the desired endpoint reference to your project.

At this post, we have added a web reference to the project. In a next post, I will talk about how to dynamically bind the reference or the proxy class to a Report Server.

Advertisements

4 responses to “Adding a Reporting Services Web Reference to .Net application

  1. Pingback: Dynamically binding a Web Service reference to a Report Server Instance « SQLUninterrupted

  2. Dominik August 26, 2012 at 20:57

    Hi,
    i am trying to use ReportingService2010 Endpoint with SQl Server 2012 SSIS Script Task.
    I added only a Scipt Task to my Package (converted to Package Depl Model) and the Web Reference (http:///_vti_bin/reportserver/ReportService2010.asmx?wsdl).
    The project builds successfully (no additional code, just the reference). But when i want to close the script task dialog (with OK Button) the following message appears “Scripts contained in the package have compilation errors. Do you want to save changes?”

    Do you have any Ideas whats wrong ?

    Greeting!
    Thank you for your help.

    Domink

    • Sourabh Agarwal September 10, 2012 at 16:55

      I am assuming this is not a task from an earlier version of SQL. If it is, then it would require an upgrade.

  3. simcoadmin August 12, 2013 at 17:58

    Hi Sourabh,

    After adding this reference, i need to deply my application on lots of differrent servers, where the URL will be slightly differrent. Do you know how I can deal with this kind of problem ? Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: