WebService as DataSource in SSRS

WebService as DataSource in SSRS

In this article, I will show you how to use Web Service as Data Source in SSRS.

1. First of all create one web service in visual studio 2010. In that web service create one Web Method which returns list of strings.


public List<string> getListPlayers()
    List<string> list = new List<string>();


    return list;


1-WebService as DataSource in SSRS

2. Now publish web service on your IIS. To check whether web service was published successfully or not, paste following URL on your Internet Explorer.


you will see results something like below:

2-WebService as DataSource in SSRS

3. Now open Visual Studio 2010 and open your existing ssrs project or create new project. In that project crate new report named as DemoWebServiceDataSource. Then create a new Data Source. To create a new data source, right click on Data Source in Report Data window and select Add Data Source.

A data source properties window opens. In that select Embedded connection and select XML from list of data source.In connection string text box enter following URL :


3-WebService as DataSource in SSRS

Then click on OK button.

4. Then right click on Datasets in Report Data window and select Add Dataset.

A Dataset Properties window opens. In that select DataSource and enter following xml query into text box of query.  Then click on OK button.

<Method Namespace="http://tempuri.org/" Name="getListPlayers"></Method>

4-WebService as DataSource in SSRS

5. Now your report design looks like below :

5-WebService as DataSource in SSRS

6. Now right click on Report Area and go to Insert–>Table. Now select string as Data field in 1st Column and delete rest 2 columns.

so your report design looks like below :

6-WebService as DataSource in SSRS

7. To see the results click on preview tab. Your report should look like below screenshot :

7-WebService as DataSource in SSRS

Congratulations! We successfully completed use of WebService as DataSource in SSRS.

Leave a Reply

Your email address will not be published. Required fields are marked *