That was pretty easy. Now let's change the report so that
it displays a pie chart that a user clicks on to drill through instead of
clicking on the numbers.
1.
Close your browser to stop debugging.
2.
Open the Sales.rpt report in Visual Studio.
3.
Right click on an empty location in the report and select InsertàChart from the pop-up menu.
4.
The Chart Expert should appear. Choose Pie Chart for the Chart type.
Click on the Data tab.
5.
Change the placement to Footer. Make sure the CountryRegion.Name is
selected in the On Change of drop down list. Make sure the Sum of
SalesOrderHeader.TotalDue is selected in the Show drop down list. Click the OK
button.
6.
Right click on an empty location again in the report and select InsertàChart from the pop-up menu.
7.
Choose Pie Chart as the Chart Type and click on the Data tab.
8.
Change the Placement to For each CountryRegion.Name change.
9.
Choose the Footer option for the placement. Make sure
StateProvince.Name is selected in the On change of drop down list. Make sure
the Sum of SalesOrderHeader.TotalDue is selected in the Show drop down list.
Click the OK button.
10. Right
click on an empty location again in the report and select InsertàChart from the pop-up menu.
11. Choose
Pie Chart as the Chart Type and click on the Data tab.
12. Change
the Placement to For each StateProvince.Name change.
13. Choose
the Footer option for the placement. Make sure Address.City is selected in the
On change of drop down list. Make sure the Sum of SalesOrderHeader.TotalDue is
selected in the Show drop down list. Click the OK button.
14. Now
you need to define the entry point to the report and the links.
15. Right
click on the graph in ReportFooterSection1.
16. Select
Copy from the pop-up menu.
17. Right
click on an empty location in the report and select ReportàReport Options… from the pop-up menu.
18. Click
the Paste Link button. This should add Graph1 to the Object Name text box.
Click the OK button.
19. Right
click on the Graph in ReportFooterSection1. Select FormatObject from the
pop-up menu.
20. Click
the Hyperlink tab. Select the Report Part Drilldown option.
21. Expand
GroupFooter#1a and move the Graph2 object to the Fields to Display list. Click
the OK button.
22. Right
click on the Graph in GroupFooterSection4. Select FormatObject from the pop-up
menu.
23. Click
the Hyperlink tab. Select the Report Part Drilldown option.
24. Expand
GroupFooter#2a and move the Graph3 object to the Fields to Display list. Click
the OK button.
25. Right
click on the graph in GroupFooter#2a. Select FormatObject from the pop-up
menu.
26. Click
the Hyperlink tab. Select the Report Part Drilldown option.
27. Expand
Group Footer #3 and move the GroupNameCity2 and SumofTotalDue3 to the Fields to
Display list. Click the OK button.
Run the project again and you should see the following page.
Click on Canada and you will see a pie chart of the
Provinces in Canada.
Click on Quebec. This will show you a pie chart of the
cities in Quebec that have placed orders.
Click on Brossard. This will show you the total for
Brossard.
Click on the $719,967.81. This will display the details of
the orders from Brossard.