In the Paper Design view, the data is grouped by the Sales Representative with customer data listed below each Sales Representative.
All the data will display on one page and the individual sales transactions for each customer is not yet available. You will need an additional query in the Data Model to accomplish this.
Click the Data Model button in the toolbar.
In the Data Model view, click the SQL Query tool in the tool palette then click in an open area of the Data Model view, somewhere to the right of query Q_1, to display the SQL Query Statement dialog box.
In the SQL Query Statement field, enter the following
SELECT CUSTID,PRODNAME,AMOUNT FROM SALES ORDER BY CUSTID
You can enter this query in any of the following ways:
Copy and paste the code from the provided text file called
pagenum_code.txt into the SQL Query Statement field.
Click Query Builder to build the query without entering any code manually.
Type the code in the SQL Query Statement field.
Click OK to display the new query in the Data Model view.
In the Data Model view, click the Data Link tool in the tool palette.
Using the cross hairs of the cursor, click CUSTID in the G_NAME group and drag the cursor to custid1 in the G_custid1 group, then release the mouse button to link the CUSTID and custid1 fields between the two groups.
Position the Report Editor window to display it alongside the Object Navigator so that you can view both windows simultaneously.
In the Object Navigator, under the Data Model node, expand the Groups node. Then, under the Paper Layout node, expand the Main Section node. Compare these two structures and note that even though additional data is made available in the Data Model by adding query Q_2, the Paper Layout will not use this additional data unless modified to do so. We will do this next.