16 Building a Header and Footer Report

In this chapter, you will learn about reports that include headers and footers. By following the steps in this chapter, you can generate the report output shown in Figure 16-1.

Figure 16-1 Group left report output with header and footer

Description of Figure 16-1 follows
Description of ''Figure 16-1 Group left report output with header and footer''

This report has a page header, Employee Summary Report, printed in the upper margin area of every page of the report, and a footer, Total Salary for Department <number>: <sum_sal>, printed at the end of the list of employee information for each department.

Concepts

  • A header and footer report contains boilerplate or fields in its header or footer. To create headers and footers in your report, add the boilerplate or field in the Paper Layout view of the Report Editor. If you create a field, make sure there is only one value for it. Otherwise, Reports Builder will not know which of the different values you want to print.

  • How often the boilerplate and fields appear and whether they are headers or footers depends on where you position them in the layout. Any boilerplate that is positioned within a repeating frame will print once every time the repeating frame prints. Boilerplate that is outside of all repeating frames will print once for the entire report.

Data Relationships

This report uses one query to select all necessary columns. You'll add a break by assigning a column to a second group.

Layout

This report uses a group left layout with modifications. You'll increase the size of a repeating frame and the frame enclosing it to ensure they are large enough to contain a footer, then add the footer. Then you'll modify the vertical spacing of a repeating frame to add space between each instance of it.

Example Scenario

In this example, you will create a report that displays and summarizes employee data by department. To make the report more readable, you decide to add a header to each page and to add footer for each master record.

As you build this example report, you will:

To see a sample report with a header and footer, open the examples folder named headerfooter, then open the Oracle Reports example named headfoot.rdf. For details on how to access it, see "Accessing the Example Reports" in the Preface.