Collapse AllExpand All

4.3. Establishing Report Sections

Earlier in the user guide you learned about report sections. Next we will activate our report's sections. From the Document menu, select the Section Editor option. The following screen will appear:

Initial Section Editor settings

Select the following options using your mouse:

  • Report Header

  • Report Footer

  • Page Footer, Any Page(s)

  • Page Footer, Last Page

You'll see later that we will leave the contents of the Page Footer, Last Page blank, as this will suppress the printing of the Page Footer, Any Page(s) so that only the report footer will print at the end of the report and we will not have a redundant section. This technique also applies to report headers, but not in this case as this report will contain only a report header and a group header, which we are about to define:

From the Detail Sections display, select the unnamed detail section and click the EDIT button. Set the following:

Section Name

Change to "group".

Query Source

Select the one you just entered called detail.

Insert Page Break At End of Last Section

Leave unchecked. We will only have one section and will chose not to set a page break.

Group Sections

Click the ADD button to add a new group.

You will now see a Group Section Editor screen that you will fill in with the following values as shown below:

Group Section Editor

A group section enables you to identify a column in the query by which we will organize the display of the information. In this example we have call reports filed by several people. By grouping on the LastName column, we will have a report that organizes calls by caller. The options available to us include the following:

Show Group Header

Creates a group header section. Frequently used to display the column by which the report is grouped (in this case the caller's last name) and report column descriptions.

Show Group Footer

Creates a group footer section in which footer information, such as sub-total and total query results, may be displayed.

Insert Page Break After the Footer

When selected, a page break is inserted between the end of one set of groups and the beginning of the next.

Upon clicking OK on the Group Section Editor and then the Detail Section Properties screens, you will find that your Section Editor screen now has a Detail Section called "group", as shown below:

Section Editor screen after Detail Section added

Closing the Section Editor screen now returns you to the report's layout. This will now include space for all of the sections you have created, as shown below:

Sections Added to Report Definition

The example shown above has been populated with the following information defined by section:

Report Header

The report's title and a line. This appears on the first page only.

contact Group Header

This is the header for the group you just created called "contact". It will display the caller's first and last names from the query. Note that while the query may return many rows for a caller, the caller's first and last name will be displayed only from the first row for each group. It will also display the column headers above each set of calls grouped by caller.

group Detail

This section displays the rows returned for each caller. In the group header we display the caller's name. Here we display the details for one or more calls made by this caller.

contact Group Footer

The contents of this section display at the end of each set of calls for each caller.

Report Footer

The context query called "page_number" is used here to display a page number on the bottom the last page of the report.

Page Footer (Last)

The next section is a Page Footer (Any) which will put a page number on every page, including the report footer—which would be redundant if we take no action. A blank Page Footer (Last) serves to override the Page Footer (Any) with a blank footer on the last page so that the only page number displayed on this page is the one from the report footer.

Page Footer (Any)

This places a page number on every page of the report. We suppress this on the last page of the report with a blank Page Footer (Last) so that only the report footer is used.

Next we will define the parameters that will be used at run time when the report is generated with the report renderer.