Pie Chart Report in SSRS

Pie Chart Report in SSRS

In this article, I will show you how to create Pie Chart Report in SSRS.

1. First of all open Visual Studio 2010 and create blank report as described in my previous article.

http://bhushan.extreme-advice.com/chart-report-in-ssrs/ (Step 1 – 2)

2. Now add data source and after that add data set as describe in my previous article.

http://bhushan.extreme-advice.com/chart-report-in-ssrs/ (Step 4 – 7)

In this report we used following query:

SELECT		DATEPART(Year, SOH.OrderDate) AS OrderYear, PC.Name AS ProdCat, SUM(SOD.LineTotal) AS Sales
FROM		Sales.SalesOrderHeader AS SOH INNER JOIN
			Sales.SalesOrderDetail AS SOD ON SOH.SalesOrderID = SOD.SalesOrderID INNER JOIN
			Sales.SalesPerson AS SP ON SOH.SalesPersonID = SP.BusinessEntityID INNER JOIN
			HumanResources.Employee AS E ON SP.BusinessEntityID = E.BusinessEntityID INNER JOIN
			Person.Person AS C ON E.BusinessEntityID = C.BusinessEntityID INNER JOIN
			Production.Product AS P ON SOD.ProductID = P.ProductID INNER JOIN
			Production.ProductSubcategory AS PS ON P.ProductSubcategoryID = PS.ProductSubcategoryID INNER JOIN
			Production.ProductCategory AS PC ON PS.ProductCategoryID = PC.ProductCategoryID
WHERE		DATEPART(Year, SOH.OrderDate) = 2008
GROUP BY	DATEPART(Year, SOH.OrderDate), PC.Name

3. Now right click on report area and go to Insert–> chart.

Pie Chart Report in SSRS-1

4. A Select Chart Type window pops-up.

In that select Shape from left pane and then select Pie chart as shown in below screen:

Pie Chart Report in SSRS-2

Then click on OK button.

5. Now you will see a representation of the pie chart on the design surface.

Pie Chart Report in SSRS-3

6. Click anywhere on the chart area to activate Chart Data Window.

Click on + sign in right side of Category Groups and select ProdCat from available fields.

Similarly click on + sign in right side of Values and select Sales.

So now your chard data window looks like below:

Pie Chart Report in SSRS-4

7. Now you can see report by clicking on Preview Tab. So your result looks like below:

Pie Chart Report in SSRS-5

8. Now if you want ToolTip on Series, Right click on Series and select Series Properties from the context menu. A Series Properties Window pops-up. Then select ToolTip from the dropdown list as shown in below screen shot.

Pie Chart Report in SSRS-6

Then click on OK button.

9. Now click on Preview button to see tooltip.

Pie Chart Report in SSRS-7

10. You can also change the position of Legend. To change the position of legend, right click on legend and select Legend Properties.

Pie Chart Report in SSRS-8

11. A Legend Properties Window pops-up. In that select Legend Position.

Pie Chart Report in SSRS-9

12. Now click on Preview tab to see the results.

Pie Chart Report in SSRS-10

Congratulations! We successfully completed Pie Chart Report in SSRS.

One thought on “Pie Chart Report in SSRS

Leave a Reply

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