Finally, we
will create a Bar Chart that will show sales performance for employees during a
particular time period.
Pie Chart
In the following exercise, we are going to look at how to build a Pie Chart. A Pie
Chart is a very common report type used in business to display percentages.
1. Create a new report called Employee_Sales_Percentage.rptdesign for the
Classic Cars - With Library project.
2. From the ClassicCarsLibrary.rptlibrary under Library Explorer, right-click
on dsClassicCars Data Source, and select Add to Report.
Charts, Hyperlinks, and Drill-Downs
[ 206 ]
3. Create a new Data Set called totalSales using the following query:
select
CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER,
CLASSICMODELS.EMPLOYEES.LASTNAME || ', ' ||
CLASSICMODELS.EMPLOYEES.FIRSTNAME name,
sum(CLASSICMODELS.ORDERDETAILS.PRICEEACH) sales
from
CLASSICMODELS.EMPLOYEES,
CLASSICMODELS.ORDERS,
CLASSICMODELS.ORDERDETAILS,
CLASSICMODELS.CUSTOMERS
where
CLASSICMODELS.CUSTOMERS.SALESREPEMPLOYEENUMBER =
CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER
and CLASSICMODELS.ORDERS.CUSTOMERNUMBER =
CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER
and CLASSICMODELS.ORDERDETAILS.ORDERNUMBER =
CLASSICMODELS.ORDERS.ORDERNUMBER
and CLASSICMODELS.ORDERS.ORDERDATE between ? and ?
group by
CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER,
CLASSICMODELS.EMPLOYEES.
Pages:
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173