Previous Next

Task 5:  Build a data set for the payments subreport

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

1  
2  
Payments
3  
4  
5  
SELECT Payments.paymentDate,
Payments.amount
FROM Payments
WHERE Payments.customerNumber = ?
This statement selects the PAYMENTDATE and AMOUNT columns from the Payments table. The WHERE clause has a parameter marker for the value of CUSTOMERNUMBER. When the report runs, the payments subreport gets the current CUSTOMERNUMBER value from the customers report.
6  
7  
1  
2  
3  
*
*
*
*
*
4  
8  
Choose Preview Results to confirm that the query returns the correct data. Figure 12-6 shows the data rows that the data set returns for customer number 103.

Figure 12-6 Data preview for the payments subreport

Figure 12-6  Data preview for the payments subreport
9  

(c) Copyright Actuate Corporation 2013