We
will also look at aggregating values inside of the Chart so that we can just provide
a query that gives the details and let BIRT handle the tricky stuff for us, and write a
query that just retrieves data.
1. Create a new report called EmployeeSalesPerformanceReport.rptdesign.
Use the dsClassicCars Data Source in the Library.
2. Create a new Data Set called employeeSales, and use the following query:
select
CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER,
CLASSICMODELS.EMPLOYEES.LASTNAME || ', ' ||
CLASSICMODELS.EMPLOYEES.FIRSTNAME name,
CLASSICMODELS.ORDERDETAILS.PRICEEACH,
CLASSICMODELS.ORDERS.ORDERDATE,
CLASSICMODELS.PRODUCTS.PRODUCTNAME
from
Charts, Hyperlinks, and Drill-Downs
[ 226 ]
CLASSICMODELS.EMPLOYEES,
CLASSICMODELS.CUSTOMERS,
CLASSICMODELS.ORDERS,
CLASSICMODELS.ORDERDETAILS,
CLASSICMODELS.PRODUCTS
where
CLASSICMODELS.ORDERS.ORDERNUMBER =
CLASSICMODELS.ORDERDETAILS.ORDERNUMBER
and CLASSICMODELS.EMPLOYEES.EMPLOYEENUMBER =
CLASSICMODELS.CUSTOMERS.SALESREPEMPLOYEENUMBER
and CLASSICMODELS.ORDERS.CUSTOMERNUMBER =
CLASSICMODELS.CUSTOMERS.CUSTOMERNUMBER
and CLASSICMODELS.PRODUCTS.PRODUCTCODE =
CLASSICMODELS.ORDERDETAILS.PRODUCTCODE
and CLASSICMODELS.ORDERS.ORDERDATE between ? and ?
3. Map the Data Set Parameters to Report Parameters startDate and endDate.
4. Drag a Table element over from the Palette, with 3 columns, 1 Detail Row,
and map it to the employeeSales Data Set.
Pages:
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181