Our use of cookies

We use cookies to tailor your experience, gather analytics, and provide you with live assitance. By clicking "Accept" or continuing to browse our site you agree to the use of cookies. For more details please read our Cookie Policy.

Generate SSRS Charts and Reports from live SharePoint list data

In this blog, I will show you the best way of creating a chart in SSRS Report Builder on live data coming from SharePoint lists. We will start off by looking at the lists which we are going to use for this demo and followed by how we can use SQList to synchronize data between SharePoint Lists and SQL Server database and to finish things off, we will look at how to generate our reports and charts much faster.

Scenario

Create a column chart in SSRS Report Builder which shows the total price and total current stock of products by Category Group.

If you would rather watch a video, this tutorial is also available on our YouTube channel at: https://youtu.be/bbAdZLfwPdM

SharePoint Lists

For this demo, we will use three custom lists with some data in SharePoint.

Product list

  • This list contains all the products data.
  • Columns
    • Title (Single Line of Text)
    • Unit Price (Money)
    • Current Stock (Number)
    • Category ID (lookup column linked to category list).

Category List

  • It is a custom list which contains data of all the product categories.
  • Columns
    • Title (Single Line of Text)
    • Category group ID (lookup column linked to Category groups list).

Category Group List

  • It is a custom list which contains data of all the product category groups.
  • Columns
    • Title (Single Line of Text)

Step-1: Create a Database in SQL Server

First off, we need a database that will be used for replicating the data coming from SharePoint lists.

  • Open SQL Server Management Studio and create a new database named “ProductsReportdemo”.

 

Step-2: Replicate and Synchronize data to Database

Secondly, we need to replicate the data from SharePoint lists into SQL Server database. We will use SQList to achieve that.

  • Open SQList Manager and click on “Create a new replication”.

  • Create a new SharePoint connection, enter the connection name and Table prefix
  • and select the SharePoint site which contains the lists and clicks next.

  • Next step is to select the replication lists, we will select the 3 lists which are going to be used for this exercise i.e. Product, Category and Category Group.

  • Next, enter the details for the destination SQL database connection which is the database we created earlier.

  • Last step is to give this replication a name, and keep the default options as checked and then click finish.
  • Once the replication is created, SQList replication service will start off for synchronizing the SharePoint lists and SQL database.
  • Once the service is started, you will see that some tables have been created in the destination database including the tables for the lists which we selected.

Note: SQList will keep the database in-sync with the SharePoint lists which means any updates made in the lists will be replicated in this database as well.

  • In order to generate a report in the report builder, we will need a SQL view for the dataset.
  • So, Let’s create a view that includes the Product category title, Sum of UnitPrice and Sum of CurrentStock from Product.

Step-3: Generate a Chart in SSRS

  • Let’s open up Report Builder which comes as part of SSRS installation for designing reports.
  • Select Chart Wizard for creating new report.

  • We need to define the data source which will be used by the report. We will use the database which we created earlier as our data source for the report.

Note: Here we are using sql user for authentication. You can opt for windows authentication as well.

  • Next step is to design the query which will be used by the report for fetching the dataset and we will use our SQL view.

  • Now, we will arrange the fields for the report.
  • We will drag and drop CategoryGroup in Categories and the two Sum(TotalPrice) & Sum(TotalStock) fields in Values.

  • Our report is now ready but it is still in design view, lets click on Run to generate report.

  • Time to publish our report to SSRS, so save the report and click on Publish. Then browse to the SSRS Report Server and you will see a new report has been added.

  • Click on the report to see the report in runtime.

  • Now to test the synchronization, let’s go to SharePoint and add a new item in Products list. Lets add a product that belongs to  Category Group “Digital Products” and set 10000 as stock. It will take few seconds to synchronize in our database, Once you refresh the report you will see that our chart has changed.

Conclusion

To summarize, today we saw how to generate a column chart in Report Builder and then publish it to SSRS report server. We used SQList for replicating and synchronizing data coming from  SharePoint lists using SQList so the chart reflects changes made to SharePoint Lists.

Latest articles

Build your Apps in MS Teams with MS Dataverse for Teams

27 Jun 2022

MS Teams has become one of the most widely used tools for team collaboration and communication in organizations using Microsoft echo-system for […]
[read article]

Dataverse: A one-stop-shop for your App data storage and management

24 May 2022

Data is at the centre of any business application development and is often the deciding factor for which tech. stack to be used for the development. […]
[read article]

AxioWorks Newsletter April 2022: Still working on the next release of SQList…

30 Apr 2022

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

What’s coming in Power Platform Release wave one of 2022

21 Apr 2022

Due to the ever-rising popularity of the Power platform, Microsoft continues to focus on improving the usability and versatility of the Power […]
[read article]

AxioWorks Newsletter March 2022: Working on the next release of SQList

30 Mar 2022

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

How to Efficiently Develop and Deploy Solutions in Power Platform

20 Mar 2022

With the Emergence of Low Code to No-Code development platforms, developers have been ever so busy developing solutions utilizing those platforms […]
[read article]

AxioWorks Newsletter February 2022: A good month

28 Feb 2022

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

Five most awesome features in MS Lists

20 Feb 2022

Microsoft Lists previously known as SharePoint Lists have been widely used for maintaining and storing data in SharePoint and its usage has grown […]
[read article]

AxioWorks Newsletter January 2022: Hello 2022, good bye Covid (we hope)

31 Jan 2022

Hello Reader, Welcome to another exciting issue of our monthly Newsletter! Each month, we try our best to bring to you content that is relevant and […]
[read article]

What went down at MS Ignite 2021: Power Automate and Power Virtual Agent Edition

14 Jan 2022

When we talk about the biggest annual tech conferences of the year, Microsoft Ignite comes to mind where not only do we get a view of all their […]
[read article]

Get SharePoint and SQL news to your inbox

Stay up-to-date with industry news and trends, SQL and SharePoint innovations and all the latest from AxioWorks by subscribing to our monthly newsletter.

Subscribe to the AxioWorks newsletter

*