Modify your data model

Building a Report Using a Preprinted Form 32-7 Figure 32–5 Complete Data Model view of the preprinted forms example

8. Save your report.

32.3 Create the Layout for Your Report

The steps in this section will show you how to create a layout that displays the objects in the desired locations on your preprinted form. You will start by adjusting the margin of your report, then creating the mailing label portion that will print at the top of each page that shows the address information for the customer. You will then create the body of the report, which contains the order information that display the date, order number, description, number, price per item, and total price.

32.3.1 Set up your report layout

Before you can start adding layout objects, you will need to adjust the margin of your layout. To set up the layout:

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

your report. 2. To make it easier for you to manipulate your layout objects, expand the size of the Paper Layout window. 3. Click the Edit Margin button in the toolbar to view the margin portion of the layout. 4. Using the resize handles, adjust the size of the margin the solid black bar to the dimensions of your form. In our example, our form is 8.5 inches by 11 inches 21.6 centimeters by 27.9 centimeters, so we will expand the margin to 8.5 inches 21.6 centimeters across, and 11 inches 27.9 centimeters down. Tip: You can use the corner resize handles to adjust the size of your margin. 32-8 Oracle Reports Users Guide to Building Reports 5. Click the Edit Margin button in the toolbar again to return to the body of the layout. Now, you are ready to create your report layout.

32.3.2 Create an address label for your form

In this section, you will use the Report Block Wizard to create a mailing label for the address section of your preprinted form. To create an address label:

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

2. Using the rulers along the edges of the Paper Layout view, drag a rectangle starting at 1 inch 2.5 centimeters from the left and 0.25 inches 0.5 centimeters from the top, to 6 inches 15 centimeters from the left and 1.25 inches 3 centimeters from the top. Release your mouse button to display the Report Block Wizard.

3. On the Style page of the Report Block Wizard, select Mailing Label, then click

Next .

4. On the Groups page, click G_CUSTOMER and click Down in the Available

Groups list to specify the Print Direction and move this group to the Displayed Groups list, then click Next. 5. In the Mailing Label Text field, create a mailing label by clicking the appropriate columns and buttons for example, click EMPLOYEE_NAME in the Available Fields list, then click and New Line, and so on, so that the Mailing Label Text field looks like this: EMPLOYEE_NAME CUSTOMER_NAME C_STREET_ADDRESS C_CITY, C_STATE_PROVINCE C_POSTAL_CODE

6. Click Next.

7. On the Template page, select No template, then click Finish to display your report

layout in the Paper Layout view. It should look something like this: Figure 32–6 Paper Layout view of the initial layout 8. The region that you just created is a boilerplate object called B_TBP. While this object is selected, view the Object Navigator and notice the new boilerplate object: Note: For more information on building a mailing label report, see Chapter 6, Building a Mailing Label Report . Building a Report Using a Preprinted Form 32-9 Figure 32–7 Report Block boilerplate object in the Object Navigator

9. While the object is selected, choose Tools Property Inspector to display the

Property Inspector or right-click the object and choose Property Inspector. 10. In the Property Inspector, under General Layout, set the Horizontal Elasticity property to Variable. This ensures that appropriate space is available for the mailing label text. 11. Save your report.

32.3.3 Add the order item details to your report

In this section, you will add a report block that displays the order items and details that correspond to the customer identified in each mailing label. These items and details are required for your preprinted form. To add order item details to your report: 1. In the Object Navigator, click the repeating frame R_G_CUSTOMER that surrounds the boilerplate object B_TBP created in Section 32.3.2, Create an address label for your form . 2. In the Paper Layout view, with R_G_CUSTOMER selected, use the corner resize handles to adjust the size of the repeating frame to the size of your preprinted form in our example, 8.5 inches 21.6 centimeters across and 11 inches 27.9 centimeters down. Make sure the frame does not extend beyond the single page boundary. 3. Click the Report Block tool in the tool palette. 4. Using the rulers as guides, drag a region 0.25 inches 0.5 centimeters from the left and 1.5 inches 4 centimeters from the top, to 8.25 inches 21 centimeters from the left and 2 inches 5 centimeters from the top. Release your mouse button to display the Report Block Wizard.

5. On the Style page of the Report Block Wizard, select Group Left, then click Next.

6. On the Groups page, click the following groups and click Down in the Available

Groups list to specify the Print Direction and move them to the Displayed Groups list, then click Next: ■ G_ORDER_DATE ■ G_ORDER_ITEMS 7. On the Fields page, click the following fields in the Available Fields list and click the right arrow to move them to the Displayed Fields list, then click Next: