Previous Next

Task 7:  Create the orders subreport

The orders subreport lists the orders for each customer in a row and column format. It displays the order number and date of each order. To iterate through the Orders data set rows and display them in a row and column format, you use the table element.

1  
2  
3  
*
*
*
Choose OK. A table appears in the detail area of the list, as shown in Figure 12-12.

Figure 12-12 Table inserted in the detail area of the list

Figure 12-12  Table inserted in the detail area of the list
4  
5  
In the layout editor, the table cell containing the dropped data set field contains a data element that displays [ORDERNUMBER]. Above this data element is a label element that the layout editor adds to the header row. This label displays the field name as static text and serves as the column heading.
6  

Figure 12-13 Report design including the orders subreport

Figure 12-13  Report design including the orders subreport
7  
1  
2  
3  
4  
*
*
8  
The same order records appear for every customer because you specified a default value of 103 for customerNumber when you created the data set parameter, CustID. Using this default value, the orders subreport always displays the order records for customer 103. The solution is to update the value of the CustID parameter dynamically each time the customer row in the master report changes. This procedure is described in the next task.
The column headings appear in bold and are centered because BIRT Report Designer uses the browser’s default format for elements placed in a table header. You reformat these elements in a later task.

Figure 12-14 Preview of the report showing repeated order records

Figure 12-14  Preview of the report showing repeated order records

(c) Copyright Actuate Corporation 2013