How to create and customize Pie Chart using SSRS Report builder in SharePoint

In this post, we will create a Pie Chart that will display report from the SharePoint list. It shows the number of applications received for different schools. Something like this –

screen3

  1.  Create a ‘Reports’ document library in SharePoint site using ‘Report Library’ List template. Go to “List settings”, click on ‘Add from existing site content types’ and add the following content types –

screen1

2.  To create a report. Click on ‘Report Builder Report’ under ‘New Document’ as shown below –

screen2

3. In “Getting Started”, Click on “Chart Wizard” under “New Report.

4. In next page, choose “Create a dataset” and click on “Next”.

5. In the following page, Select the DataSource and click “Next”.

6. Select the SharePoint list on which you want to generate a report and click “Next”.

screen4

7. Choose the Chart Type as “Pie” and click “Next”.

8. Under “Categories”, add a field on which you want summarized data. In my case, it’s “School Applied for” (or School Type) which has values Junior, Middle, senior school etc. As I want to count the number of applications for each school, I would select “count” as a formula to be applied on “School applied for” field under “Values”. Click “Next”.

Screen5

9. Choose the “Style” and click “Finish”.

10. You can drag to adjust the size of your chart.

11. To show the number or percentage of applications received on each pie, right click on the pie and click on “Show Data Labels”.

Screen6

12. If you want to display percentage as Data label then select the labels on the Pie, right click and click on “Series Label Properties” –

Screen7

13. Choose the ‘Label Data’ as “Percent” and click ‘OK”.

14. To Test the report, click on “Run” to test the report.

How to Customize the Pie Chart Colour

15. Now, let’s also see how we can change the colour of the pies.

16. Again, right click on Pie chart and then click on “Series Properties”.

17. In “Series Properties” dialog box, select “Fill” and the click on expression box under “Pick color”.

Screen8

18. In the expression box, generate the expression similar to as shown below.

Switch(Fields!School_Applied_for.Value=”Junior School”,”SeaGreen”,Fields!School_Applied_for.Value=”Junior Secondary School”,”MediumTurquoise”,Fields!School_Applied_for.Value=”Middle School”,”SlateBlue”,Fields!School_Applied_for.Value=”Senior School”,”Khaki”

)

To generate the similar expression, you can take help from the links under “Category” as shown on the image below. For-example, to get the field name and corresponding, you can use “DataSets” and “Constants” link respectively.

Screen9

19. Click ‘Ok’ and Done. Click on “Run” to test the report and then “Save” it.

End result should be something like this –

Screen10

Leave a Comment

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