Using the DECLARE-LAYOUT Command

Use the DECLARE-LAYOUT command to set the page layout and to include important options, such as the paper size and margins.

Here is a typical SETUP section:

begin-setup
   ! Declare the default layout for this report
   declare-layout default
      paper-size=(8.5,11)
      left-margin=1    right-margin=1
      top-margin=1     bottom-margin=1
   end-declare
end-setup

In the preceding example, the DECLARE-LAYOUT command sets the paper size to 8 1/2 by 11 inches, with all margins at 1 inch.

In SQR for PeopleSoft, data is positioned on the page using line and character position coordinates. Think of the page as a grid and each cell in the grid holds one character. With such a grid, in a position qualifier consisting of (line, column, width), column and width are numbers that denote characters and spaces.

The main attributes of the DECLARE-LAYOUT command affect the structure of a page.

The PAPER-SIZE argument defines the dimensions of the entire page, including the margins. The TOP-MARGIN, LEFT-MARGIN, BOTTOM-MARGIN, and RIGHT-MARGIN arguments define the margins. In SQR, you cannot print in the margins.

In the preceding sample program, the left margin uses 10 spaces and the top margin uses 6 lines. The page width accommodates 65 characters (without the margins) and 54 lines.

The default mapping of characters and lines to inches is 10 characters per inch and six lines per inch . These dimensions mean that each character cell is 1/10 inch wide and 1/6 inch high. These settings are used when a program does not contain a DECLARE-LAYOUT command.