Previous Topic: Step 2 - Display your reportNext Topic: Step 1 - Specify page headers and footers


Making Page Headers and Footers

This example shows you how to use the Page Header/Footer screen to:

To get to the Page Header/Footer screen, type page in the command line and press [Enter].

CA OLQ Release nn.n *** Page Header/Footer *** -> Page 1 OF 1 152000 Specify page header(s), footer(s) and press the ENTER key Format for $DATE: MM/DD/YY Use variables: $DATE, $TIME, $PAGE, $LINE, $USER... Skip lines before heading: 0 Skip lines after heading: 1 Line Page heading text Align 1 DEPARTMENT/EMPLOYEE/EMPOSITION REPORT CENTER 2 $DATE CENTER 3 CENTER 4 CENTER 5 CENTER Skip lines before footing: 1 Skip lines after footing: 0 Line Page footing text Align 1 - $PAGE - CENTER 2 CENTER 3 CENTER 4 CENTER 5 CENTER 1=HELP 3=QUIT 4=MESSAGE 5=DISPLAY 6=MENU

Default page headers and footers

When you build a new report, CA OLQ automatically adds a standard page header and page footer to each page of the report. The page header includes the names of the tables or records used and the current date:

EMPLOYEE REPORT
   mm/dd/yy

The page footer displays the number of each report page:

- 1 -

Note: You specify page headers and footers in the same way. In this discussion, the examples will illustrate only page headers.

Specifying text

To change the text in your header, type your text over the default text under Page heading text:

Input:

    Line        Page heading text                      Align

    1           Widget Inventory                       center
    2           $date                                  center
    3                                                  center
    4                                                  center
    5                                                  center

Output:

                      Widget Inventory
                         mm/dd/yy

Using variables

CA OLQ provides variables that you can include in your headers. These variables are placeholders for which CA OLQ substitutes real values (such as a page number).

Variable

Description

Example

$DATE

Displays the current date using the user-specified date format

10/24/99

$EDATE

Displays the current date (European format)

24/10/99

$JDATE

Displays the current date (Julian format)

99297

$TIME

Displays the current time

10:30:59

$PAGE

Displays the current page number

- 12 -

$USER

Displays the user ID (of the report's creator)

JFK

$LINE

Displays the current line number

33

Changing text alignment

To change how your header is aligned, specify LEFT, RIGHT, or CENTER under Align:

For example:

Input:

Line        Page footing text                      Align

1           Agricultural Budget Report             right
2           Central Region                         right
3                                                  CENTER
4           Page  $page                            right
5                                                  CENTER


Output:

                               Agricultural Budget Report
                                           Central Region

                                                 Page  22

Leaving blank lines before your text

To add to the top margin of your report, enter a number next to Skip lines before heading. If you type 0, CA OLQ will leave no blank lines before it prints the page header. To leave one or more blank lines, type a number from 1 through 9.

Leaving blank lines after your text

To provide space after your page header, enter a number next to Skip Lines After Heading. If you type 0, CA OLQ will leave no blank lines after it prints the page header. To leave one or more blank lines, type a number from 1 through 9.

Putting more than one text element on a line

To list more than one text element on a line, specify the same number in the Line entry for both elements. For example:

Input:

 Line        Page heading text                      Align

 1           Industrial Gizmos Inventory            CENTER
 1           $date                                  right
 3                                                  CENTER
 4                                                  CENTER
 5                                                  CENTER


Output:

              Industrial Gizmos Inventory           10/17/99

Session Options That Affect Page Headers and Footers:

Session Option

Function

Header

CA OLQ displays page headers on your report.

Noheader

CA OLQ displays the report without page headers (even if you've created new headers on the Report Format - Page Header/Footer screen).

Olqheader

CA OLQ uses any headers you've typed on the Report Format - Header screen (or that have been created in the data dictionary).

Noolqheader

CA OLQ ignores your headers and uses the column names from the database as the headers on the report.

To get to the Session Options screen, type options on the command line of any screen and press [Enter].

Specifying the date

The Format for $DATE: field displays the report date format. Valid date formats are listed in the following table.

Specifying a Date Format on the Page Header/Footer Screen:

Format

Explanation

Example

MONTH

Displays the full month name in uppercase.

JANUARY

Month

Displays the first letter of the month name in uppercase and the rest of the month name in lowercase.

January

month

Displays the full month name in lowercase.

january

MON

Displays the first three letters of the month name in uppercase.

JAN

Mon

Displays the first three letters of the month name. The first letter is uppercase; the last two letters are lowercase.

Jan

mon

Displays the first three letters of the month name in lowercase.

jan

MM

Displays a zero-significant numeric representation of the month.

January is represented as 01.

ZM

Displays a zero-suppressed numeric representation of the month.

January is represented as 1.

DD

Displays a zero-significant numeric representation of the day.

The 3rd is represented as 03.

ZD

Displays a zero-suppressed numeric representation of the month.

The 3rd is represented as 3.

YY

Displays a two-digit representation of the year.

1999 is represented as 99.

YYYY

Displays a four-digit representation of the year.

1999 is represented as 1999.

CC

Displays a two-digit representation of the century.

20