Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

XML Document Sourced SSRS Report Using HTTP URL

0.00/5 (No votes)
11 May 2015CPOL2 min read 10K  
XML Document Sourced SSRS Report Using HTTP URL

Introduction

In my Business Intelligence development experience, most of my SQL Server Reporting Services (SSRS) Reports have largely been based off relational data sources such Microsoft SQL Server and Oracle database. However, in some instances whereby an SSRS report is based off Operational Data Source (ODS) or Online transaction processing (OLTP) system, Extensible Markup Language (XML) could be a designated data source. There are numerous ways of source XML as a data source which includes embedded XML data, and Web service endpoints that return XML data. However, in this post, I will take you through an example of sourcing an XML document via Hypertext Transfer Protocol (HTTP) protocol-based URL.

The XML document that we will be using is that of the select SIFISO blogs which is located here.

The aforementioned document looks as shown below:

14

Source Code Changesets

The changesets associated with the source code for this article can be found on GitHub and CodePlex as shown below, respectively:

11_a tfs_11

Walkthrough

Okay, let’s get started.

Create a new SSRS report and configure your (shared) report data source as follows:

2

You don’t have to edit the credentials tab.

Let’s move on to the shared data set. I’ve decided to retrieve all top levels of data from our data source, hence the shared data set query is defined as shown below:

4

Whilst on the shared data set – click on the fields tab such that the below is shown:

6

That concludes our configuration of XML data set.

Now we move on to visualizing the XML data and for that I decided to use an SSRS chart control. We understand that search engines uses a sitemap to crawl and rank a given website – thus an updated and refreshed sitemap can increase the site ranking on search engines. Therefore, a possible business case from our XML data could be: “how often is the sitemap refreshed?”.

We go on solving this by adding a new report item and configure the report data to look as follows:

8

Add a chart control into the body of your report and configure the chart properties as follows:

10

I have chosen a Bar chart type, but feel free to choose a different chart type else:

11

Define your series group as shown below:

12

Let’s define our measure as follows:

13

The design view of your report should look as follows (provided you used the same chart type as I did):

9

The preview/run time view should be able to address the business case and thus look as follows:

1

Conclusion

That’s all folks.

I hope you were able to learn something from this post.

Until next time, cheers.

Image 14

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)