Use the Paper Layout View to Create Two Layouts

13-6 Oracle Reports Users Guide to Building Reports To create the first layout:

1. Choose Tools Report Wizard.

2. On the Report Type page, select Create Paper Layout only.

3. On the Style page, select Group Left.

4. On the Groups page, ensure that all of the groups from your data model appear in

the Displayed Groups list. 5. On the Fields page, click column names and the right arrow or left arrow to move columns so that the following columns appear in the Displayed Fields list: ■ NAME ■ DESCRIP ■ ITEMTOT ■ ORDERDATE Figure 13–5 Fields page of Report Wizard

6. On the Labels page, change the labels and field widths as follows:

7. On the Template page, make sure Beige is selected under Predefined Template,

then click Finish to display your report output in the Paper Design view. It should look like this: Table 13–1 Field Description Labels Page Fields Labels Width NAME no change 15 DESCRIP Product 20 Itemtot no change no change Orderdate no change no change Building a Group Left Summary Report 13-7 Figure 13–6 Paper Design view for the group left layout with two group columns To create the second layout:

1. Click the Paper Layout button in the toolbar to display the Paper Layout view.

2. In the Paper Layout view, click the Report Block tool in the tool palette.

3. Starting about 0.5 inches 1.5 centimeters below the existing layout, click and drag

a box about 2 inches 5 centimeters high and 4 inches 19 centimeters wide. Release your mouse button to display the Report Block Wizard.

4. In the Report Block Wizard, on the Style page, select Tabular, then click Next.

5. On the Groups page, click G_CUSTID1 and click Down to specify the Print

Direction and move this group to the Displayed Groups list, then click Next. G_ CUSTID1 should be the only group in the Displayed Groups list when you are done.

6. On the Fields page, click the following fields and click the right arrow to move

them to the Displayed Fields list, then click Next: ■ DESCRIP ■ SumITEMTOTPerCUSTID1 . DESCRIP and SumITEMTOTPerCUSTID1 should be the only fields in the Displayed Fields list when you are done.

7. On the Labels page, change the labels as follows, then click Next:

Table 13–2 Field Description Fields Labels DESCRIP Product SumITEMTOTPerCUSTID1 Sum Total 13-8 Oracle Reports Users Guide to Building Reports

8. On the Template page, make sure Beige is selected under Predefined Template,

then click Finish to display your report output in the Paper Design view. It should look like this: Figure 13–7 Paper Layout view with two layouts

13.5 Merge the Two Layouts

After you have created the two layouts, you have only achieved part of your desired result. The summary of purchases by product is outside of the masterdetail layout. Hence it summarizes the product purchases for the entire report rather than the product purchases for each customer. To show the summary for each customer, you must move the second layout inside of the first one. To merge the second layout with the first: 1. In the Object Navigator, select M_G_CUSTID1_GRPFR1.

2. Click the title bar of the Report Editor to return to the Paper Layout view. Notice

that the frame around the second layout is now selected for you.

3. Use the arrow keys to position the second layout so that the F_DESCRIP1 field

lines up with the F_DESCRIP field in the first layout. 4. Click the Confine Off button in the toolbar. Ensure that Flex mode is on it is on by default.

5. In the Object Navigator, select R_G_CUSTID.

6. Click the title bar of the Report Editor to return to the Paper Layout view. Notice

that the master repeating frame in the first layout is now selected for you.

7. Click the handle at the bottom center of R_G_CUSTID and drag it down about 0.5

inches 1.5 centimeters. Because Flex Mode is on, the frame surrounding it grows Tip: To make finding this frame easier, just type in the name in the Find field at the top of the Object Navigator. Building a Group Left Summary Report 13-9 as you drag. Similarly, the second layout is moved down to avoid being overwritten.

8. With R_G_CUSTID still selected, choose Tools Property Inspector.

9. Change the Vert. Space Between Frames property to 0.25.

10. In the Object Navigator, select M_G_CUSTID1_GRPFR1.

11. Click the title bar of the Report Editor to return to the Paper Layout view. 12. Using the toolbar along the top of the Paper Layout view, turn Flex Mode off.

13. Using the arrow keys, move M_G_CUSTID1_GRPFR1 and its contents inside of

the first layout. Figure 13–8 Paper Layout view with two layouts merged into one

14. Click the Paper Design button in the toolbar of the Report Editor to display the

Paper Layout view. Notice how the summary table now repeats for each customer.