To select data for the detail report:
Display the layout for the master query in the Layout window.
Click on the Object Toolbar, select Insert, then Field, or right-click Fields in the Object Explorer and select Insert.
The Report Fields dialog box appears with the master query listed under the Database tab.
Click New and select Detail Query.
On the first Query Builder page, enter a name for the detail query.
For example, you could name the detail query for customer orders Orders, and the detail query for customer payments Payments.
Check the box next to Assign a layout to this query.
A detail query that has its own layout can return zero to many rows.
On the subsequent Query Builder pages, select the data for the detail query.
When you get to the Bind page, bind the detail query to the master query by joining one or more query fields.