Previous Next

Task 4:  Build a data set for the orders subreport

In this procedure, you build a data set to indicate what data to extract from the Orders table. The orders subreport that you create later uses this data set.

1  
2  
Orders
3  
4  
5  
SELECT Orders.orderNumber,
Orders.orderDate
FROM Orders
WHERE Orders.customerNumber = ?
This statement selects the ORDERNUMBER and ORDERDATE columns from the Orders table. The WHERE clause has a parameter marker for the value of CUSTOMERNUMBER. When the report runs, the orders subreport gets the current CUSTOMERNUMBER value from the customers report.
6  
7  
1  
2  
3  
*
*
*
*
103 is one of the values in the CUSTOMERNUMBER column. A default value is required for BIRT Report Designer to run the query for testing purposes.
*

Figure 12-4 Edited parameter definition

Figure 12-4  Edited parameter definition
4  
8  
Choose Preview Results to confirm that the query returns the correct data. Figure 12-5 shows the data rows that the data set returns for customer number 103.

Figure 12-5 Data preview for the orders subreport

Figure 12-5  Data preview for the orders subreport
9  

(c) Copyright Actuate Corporation 2013