> Task 8: | Link the orders subreport to the customers master report

> You link the orders subreport to the customers master report by binding the CustID parameter to the CUSTOMERNUMBER data set field in the customers report. Each time the customers report reaches a new customer row, the CustID parameter is updated with the new CUSTOMERNUMBER value.

> 1 | Choose Layout to resume editing the report.

> 2 | Select the Orders table.

> 3 | In Property Editor, choose Binding.

> 4 | On the Binding page, choose Dataset Parameter Binding. Dataset Parameter Binding displays the CustID parameter, as shown in Figure 13‑15. Its value is set to the default, 103, which you specified when you created the data set parameter.

> Figure 13‑15 | Dataset Parameter Binding for the Orders table

> 5 | Change the parameter value to the CUSTOMERNUMBER field in the customers report.

> 1 | Select the parameter, then choose Edit. Edit data set parameter binding, shown in Figure 13‑16, prompts you to specify a new parameter value.

> Figure 13‑16 | Edit data set parameter binding

> 2 | Choose the expression builder button that appears to the right of the Value field.

> 3 | On the expression builder, choose Available Column Bindings, choose List, then double-click CUSTOMERNUMBER. The expression builder displays the expression, row["CUSTOMERNUMBER"], as shown in Figure 13‑17.

> Figure 13‑17 | CUSTOMERNUMBER field in the expression builder

> Choose OK to save the expression and close the expression builder.

> 4 | On Edit data set parameter binding, choose OK to accept the new parameter value. Dataset Parameter Binding displays the new value of row["CUSTOMERNUMBER"] for the CustID parameter.

> 6 | Choose OK to save the changed data set parameter binding.

> 7 | Preview the report. It should look like the one shown in Figure 13‑18.

> Figure 13‑18 | Preview of the report shows correct orders data

> Now different order records appear for different customers. Not all customers have order records. To display only customers that have orders, you change the query for the customers report. This task is described later in Task 11: “Display only customers that have orders or payments.”

(c) Copyright Actuate Corporation 2009