Creating the header and footer layout

You can specify headers and footers for pages of a report or the entire report. The headers/footers can include text and data fields. For example, you might want to include two question fields that specify a starting and ending date for your report (see Using a field in your header or footer for more information). You can also specify printing control information (such as suppressing the date and page number) for each header or footer with the Header/Footer Miscellaneous Attributes function.

1. Select Design > Header/footer layout.

The Layout functions menu is pulled down. It contains options for report headers and footers, page headers and footers, and miscellaneous header/footer attributes.

2. Select the entry you want to define. A text editing window is displayed.

Using the header/footer editing window

When you select a header/footer menu entry, a header/footer text editing window is displayed. There’s a ruler at the top of the window, so you can see the exact placement of each header or footer character. The window scrolls between 1 and 255 positions.

This window supports three input modes—command, insert, and overstrike:

If your terminal allows it, the cursor blinks when you’re in insert or overstrike mode, but not when you’re in command mode.

When the header/footer text editing window first displays, you are in command mode.

Creating a report header

The report header appears at the beginning of your report. The default header is the name of the report, in uppercase letters. The report header can be up to 10 lines long; each line automatically scrolls to 255 columns.

Note

If you’ve copied this report from another report, the default header is the name of the original report, not the current report.

1. Select Layout functions > Report header.

The cursor is in the text editing window, and you’re in command mode.

2. Select Edit > Insert/overstrike mode (or press ctrl+k) to go to insert mode. (If you’d rather be in overstrike mode, press ctrl+k while you’re in insert mode.)
3. Enter a new header for the report.

For example, we decided to print the header XYZ Company Sales Report on the first page of our report, with the dates covered in the report on the second line of the header. (See figure 1.)

4. When you’ve finished editing the header, press ctrl+f to return to command mode.
5. Press the Exit shortcut to close the header window and return to the Layout functions menu.

1. Creating a report header.

Creating a report footer

The report footer appears at the end of your report. It can be up to 10 lines long; each line automatically scrolls to 255 columns.

1. Select Layout functions > Report footer.

The cursor is in the text editing window, and you’re in command mode.

2. Select Edit > Insert/overstrike mode to go to insert mode. (If you’d rather be in overstrike mode, press ctrl+k while you’re in insert mode.)
3. Enter a footer for the report.
4. When you’ve finished, press ctrl+f to return to command mode.
5. Press the Exit shortcut to close the footer window and return to the Layout functions menu.

Creating a page header

The page header appears at the top of each page of your report. The default page header is the field header line(s) for your report entries. The page header can be up to 10 lines long; each line automatically scrolls to 255 columns.

1. Select Layout functions > Page header.

The cursor is in the text editing window, and you’re in command mode. A data layout window is displayed at the bottom of the screen. If you’re creating a new report, the field header lines are displayed in the text editing window.

2. Select Edit > Insert/overstrike mode to go to insert mode. (If you’d rather be in overstrike mode, press ctrl+k while you’re in insert mode.)
3. Enter a new header to be used at the top of each page.

To assist you in lining up your page header with your detail records, the last six lines of the screen display the layout of your report. The lines scroll upward or downward automatically when you move your cursor to a header line that was not previously visible in the layout window.

You can view the layout of the pre‑ and post‑break lines by selecting Page header functions > Toggle data line/break lines. The first time you select it, the pre‑break line layouts are displayed. The next time you select it, the post‑break line layouts are displayed. To return to the detail record layout, select Toggle data line/break lines one more time. (For more information on break lines, see Creating a pre‑ or post‑break line.)

4. When you’ve finished, press ctrl+f to return to command mode.
5. Press the Exit shortcut to close the page header window and return to the Layout functions menu.
Note

Once you’ve modified the page header in this window, ReportWriter no longer updates the header automatically when the field header lines change (for example, when fields are moved or deleted, field headers are modified, or lines are inserted and deleted). To reset the page header to the current field header lines and remove any page header modifications, select Page header functions > Reset page header.

Also, once you have modified the page header in this window, you will not necessarily see the original header line for a given detail line in the Fields to Print function. After you modify the page header, a given detail line always displays the correspondingly numbered header line. For example, if detail line 1 has a two‑line heading (because of a split heading), after you modify the page heading, detail line 1 will display heading line 1, and detail line 2 will display heading line 2, which is actually the second line of the heading for detail line 1.

Creating a page footer

The page footer appears at the bottom of each page of your report. It can be up to 10 lines long; each line automatically scrolls to 255 columns.

1. Select Layout functions > Page footer.

The cursor is in the text editing window, and you’re in command mode.

2. Select Edit > Insert/overstrike mode to go to insert mode. (If you’d rather be in overstrike mode, press ctrl+k while you’re in insert mode.)
3. Enter a new footer for the page.
4. When you’ve finished, press ctrl+f to return to command mode.
5. Press the Exit shortcut to close the page footer window and return to the Layout functions menu.

Using a field in your header or footer

You can include a data field in the report or page header or footer you’re currently defining.

1. In the header/footer editing window, move your cursor to the location where you want to insert the field. You cannot insert a field if your cursor is on a field.

The field will be inserted beginning at the current cursor position and will overwrite any text currently in that space. Be careful to leave enough room for the field if you don’t want to overwrite existing text.

2. Press ctrl+f to return to command mode (if you’re not already in it).
3. Select Field functions > Add field. The list of available fields is displayed.

2. Adding a field to a report header.

4. Select the field you want to include in your header or footer. The field is inserted (represented by its data format).

In the example in figure 2, we’ve inserted the Starting date field on the second line of the report header; gone into insert mode to type a space, followed by the word “through,” followed by another space; and are about to select Ending date from the list of available fields. (Starting date and Ending date are question fields that we define as an example in Creating a question field.)

Note

Once you add, delete, or edit a field or assign a field conditional to your header or footer, you can no longer abandon your changes.

Viewing a header or footer field  

You can display a Print Fields list that contains the fields to be printed in the current header or footer.

1. Select Field functions > Show field names. The Print Fields list is displayed at the bottom of your screen.

Note: From this list, you can also change field attributes, subscripting, or ranging; specify a conditional; or add or delete a field.

2. Press the Exit shortcut to close the Print Fields list.

Changing a field’s attributes

You can change a field’s format or the way that format is justified within the field.

1. Place the cursor anywhere within that field in the text editing window.
2. Select Field functions > Change field attributes.

Note: You can also use the Show field names function to display the Print Fields list, highlight the field in the list, and press enter.

The Print Field Attributes window is displayed.

3. Enter data in each field as instructed below.

Format

Enter a new display format for this field. You can either type a new format or select a format from a list of available formats using the List selections function.

Data justification

This value determines how data is justified within the field’s display range (the area between the field’s starting position and the adjusted field size). Select the justification you want for this field. Valid values are None, Left, Right.

Format justification

This value determines how the field’s format is justified within the field before it’s applied to the data. Select the format justification you want for this field. Valid values are None, Left, Right.

4. Exit the window.

Modifying subscripting of an arrayed header/footer field

1. Place the cursor anywhere within the field in the text editing window.

Note: You can also use the Show field names function to display the Print Fields list and highlight the field in the list.

2. Select Field functions > Change subscripting to display the Field Subscript window.
3. See Selecting an arrayed field for details on entering subscript information for an arrayed field.

Modifying ranging

You can specify that a range of characters in a header/footer field be printed, instead of the whole field.

1. Place the cursor anywhere within the field in the text editing window.

Note: You can also use the Show field names function to display the Print Fields list and highlight the field in the list.

2. Select Field functions > Change ranging to display the Field Range window.
3. See Printing only part of a field (ranging) for details on entering ranging information for a field.

Assigning a conditional to a header or footer field

You can connect up to five conditionals together (with AND and OR) and assign them to a field to print in a header or footer.

1. Place the cursor anywhere within the field in the text editing window.

Note: You can use the Show field names function to display the Print Fields list and highlight the field in the list.

2. Select Field functions > Specify conditions.
3. See Assigning a conditional to a field for information on completing the fields.

Deleting a header or footer field

1. Select Field functions > Show field names.
2. Highlight the field in the Print Fields window.
3. Select Field functions > Delete field.

Specifying header and footer attributes

You can specify the following header/footer attributes:

1. Select Layout functions > Miscellaneous.

Note: You cannot access this function while a header/footer editing window is displayed.

3. Specifying miscellaneous header and footer attributes.

2. In the Header/Footer Miscellaneous Attributes window, enter data in the fields as instructed below.

Visible

Enter Yes if you want the specified header or footer and the page number and current date to be printed on each page. Enter No if you don’t want the header, footer, or page number and date printed. The default response is Yes for report headers, page headers, and the page number and date, and No for report and page footers.

We entered Yes for the report header, since we want it to be printed.

# of blank lines

Enter the number of blank lines that should separate the report header or footer from the rest of the report, the page header from the first report entry on each page, or the page footer from the last report entry on each page. The default is one line; the maximum is nine lines. (For report headers and footers, this number is meaningful only if you plan to answer No to the Separate page prompt.)

We ignored this field for the report header, because we’ll have it printed on a separate page.

Separate page

Enter Yes if you want to print the report header on a separate page at the start of the report or the report footer on a separate page at the end of the report. Enter No if you want the report header to appear on the first page of report entries or the report footer to appear on the last page of report entries. The default response is Yes. If you specify a separate page, the report header or footer is centered vertically on the page.

We entered Yes for the report header.

3. When you’ve finished designing headers and footers, exit the window to return to the Layout functions menu.