Format Your Report in the Paper Design View

32-14 Oracle Reports Users Guide to Building Reports Figure 32–13 Final report printed on a sample preprinted form 14. Save your report.

32.5 Add Page Numbers optional

Some preprinted forms may require you to print page numbers. The steps in this section will show you how to add page numbers to your output that will display when the number of order items extends beyond a single page. To add page numbers to your report: 1. Click the Paper Layout button in the toolbar to display the Paper Layout view. 2. Click the Field tool in the tool palette. 3. Draw a small region on your layout 6 inches 15 centimeters from the left and 0.25 inches 0.5 centimeters from the top, to 7 inches 18 centimeters from the left and 0.5 inches 1.5 centimeters from the top.

4. Double-click the new field object, F_1, to display the Property Inspector, and set

the following properties: ■ Under General Information, set the Name property to F_PAGE_NUMBER. ■ Under General Layout, set the Horizontal Elasticity property to Variable. ■ Under Field, set the Source property to Page Number, and set the Visible property to No. Click the Page Numbering property field to display the Page Numbering dialog box. 5. In the Page Numbering dialog box: ■ Clear the Header Section and Trailer Section check boxes, and make sure that the Main Section check box is selected. ■ In the Reset At list, click R_G_Customer. ■ Click OK. 6. In the Paper Layout view, following the steps above to create another field from 7.25, 0.25 to 8.25, 0.5 inches or 18.5, 0.5 to 21, 1.5 centimeters . Note: The Paper Design view of your report will not look like the image above. We printed our report on a sample preprinted form. The above image is a snapshot of that form. Building a Report Using a Preprinted Form 32-15 7. Double-click the new field object to display the Property Inspector, and set the following properties: ■ Under General Information, set the Name property to F_TOTAL_PAGES. ■ Under General Layout, set the Horizontal Elasticity property to Variable. ■ Under Field, set the Source property to Total Pages, and set the Visible property to No. Click the Page Numbering property field to display the Page Numbering dialog box. 8. In the Page Numbering dialog box: ■ Clear the Header Section and Trailer Section check boxes, and make sure that the Main Section check box is selected. ■ In the Reset At list, click R_G_Customer. ■ Click OK. Now that you have created the page number fields, you need to make them visible. 9. In the Paper Layout view, click the Text tool in the tool palette. 10. Draw a region on your layout 6 inches 15 centimeters from the left and 1 inch 2.5 centimeters from the top, to 8 inches 20 centimeters from the left and 1.25 inches 3 centimeters from the top. 11. Click inside the rectangle and type F_PAGE_NUMBER of F_TOTAL_ PAGES.

12. With the text object selected, choose Tools Property Inspector to display the

Property Inspector, and set the following properties: ■ Under General Information, set the Name property to B_PAGE_NUMBERS. ■ Under Advanced Layout, set the Print Object On property to All Pages, and set the Base Printing On property to Enclosing Object.

13. In the Paper Design view, click the Run Paper Layout button in the toolbar to run

your report and display it in the Paper Design view. Your report should now look like the following image. Notice how Reports Builder calculates that this particular report is one page, thus displays 1 of 1 above the order details. Note: The F_PAGE_NUMBER text will replace that text with the current value of the summary field you just created, which determines the page number of the current page. The F_ TOTAL_PAGES text will replace that text with the current total number of pages of the report, based on the value of the summary field of the same name. 32-16 Oracle Reports Users Guide to Building Reports Figure 32–14 Paper Design view of the preprinted form report with page numbers

14. Save your report.

32.6 Summary

Congratulations You have successfully built a report that you can print on a preprinted form. You now know how to: ■ manually create two queries and link them. ■ create a summary column. ■ create a break group in your data model. ■ use the tools in the Paper Layout view to create your layout. ■ use the Report Block Wizard to create a mailing label report. ■ use the Report Block Wizard to create a tabular report. ■ add page numbering using fields in the Paper Layout view. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help .