• No results found

■ MIXED field printing.

■ Print Item positioning considerations.

LINE Element Processing.

The standard CA-Easytrieve/Plus reporting system positions items on a print line using three rules:

1. LINE 01 items and their associated headings are centered in an area whose length is controlled by the longer of the following:

a. The line item entry. This item is expanded by the value of SUMSPACE if the item is a field that is summarized.

b. The longest heading entry.

The resulting value is called the item length or item window.

2. The first line item other than on LINE 01 (that is LINE 02 through LINE 99) is positioned under the first item of LINE 01. The data is left-justified under the

3. Blank characters (spaces) separate all line items according to the value of the SPACE parameter of the REPORT statement. In addition, the number of spaces can be altered by the +/- spacing options plus the effect of the SPREAD operation.

The Extended Reporting Facility changes this process in one way.

CA-Easytrieve/Plus must calculate the length of each of the elements associated with LINE 01 line items (namely the heading, detail and summary line elements) as:

(number of chars in element) X (width of font assigned to element)

Where the width of the largest element defines the size of the item's window. This process can result in some change to the format of a CA-Easytrieve/Plus report when the print item has heading and detail elements that use fonts of different width. This situation impacts the process CA-Easytrieve/Plus uses to determine the appropriate window for the print item. When you are using fonts of different widths for the elements of any item coded on the LINE 01 statement, CA-Easytrieve/Plus must determine a window for the item. This window includes any adjustments necessary to ensure that all the elements of the item fit within the window after each element has been positioned on its applicable print record. This means that the window can be larger than CA-Easytrieve/Plus originally determined.

The next five examples illustrate the effect of mixing fonts of different sizes in a report.

The following example illustrates CA-Easytrieve/Plus syntax that uses multiple fonts.

CA-Easytrieve/Plus Syntax:

DEFINE TEST-FIELD-1 1 8 A + HEADING (#1 'THE FIRST LINE' 'THE SECOND LINE') DEFINE TEST-FIELD-2 9 10 A + HEADING (#2 'SECOND FIELD HEADING')

.

. JOB INPUT

.

. LINE 1 #1 TEST-FIELD-1 TEST-FIELD-2

The following syntax describes the fonts that the above example references. FONTS W-UNIT SIZES

default 10 #1 8 #2 7.2

To create a print line, CA-Easytrieve/Plus must analyze the heading lines and the detail lines (the contents of TEST-FIELD-1 and TEST-FIELD-2) taking into account the size of the fonts. CA-Easytrieve/Plus then calculates a window that is large enough to encompass each of the elements of the print item that is to be output to the print line. The following example illustrates the windows that CA-Easytrieve/Plus creates using the syntax in the CA-Easytrieve/Plus Syntax example.

After calculating the windows, CA-Easytrieve/Plus determines the format of each of the print lines. To do this, CA-Easytrieve/Plus must center each print element within its own window and then determine the correct amount of space between those elements that occur on the same print line. This step is illustrated in the following example.

As is shown above, there are four gaps that must be filled with spaces by CA-Easytrieve/Plus. CA-Easytrieve/Plus attempts to fill each gap using a combination of the fonts assigned to print items on the original

In this example, not only does CA-Easytrieve/Plus use the default font (size of 10 points), but also font #1 (8 points in width) and font #2 (7.2 points).

CA-Easytrieve/Plus analyzes each gap individually and tries to determine the spacing factors that positions an element as close as possible to its assigned print position. For the current example, the following example illustrates the results produced by CA-Easytrieve/Plus.

As illustrated by the previous example, the first gap on Heading Line 1 was filled by 2 spaces using the 7.2-point font. This is as close to print position 14 as was possible with the available fonts. For the gap on Heading Line 2, the insertion of 3 spaces using the 10-point font filled the gap exactly. On the Detail Line, the first gap was filled by 6 spaces using the 7.2-point font. The second gap to be filled on the Detail Line was originally 95 points wide but because the first gap on this same line actually increased, the second gap was reduced by 0.2 points (the increase in the first gap). The resultant gap of 94.8 was then filled exactly by CA-Easytrieve/Plus using a combination of 9 spaces of 7.2 points in width and 3 spaces of 10 points in width. Consequently, CA-Easytrieve/Plus was able to position the second element on the Detail Line exactly at its assigned print position.

As was illustrated by Heading Line 1 in the previous example, when

CA-Easytrieve/Plus cannot position an element at its assigned print position, CA-Easytrieve/Plus positions the element as close as possible to its assigned position. If this movement of the element results in the element moving outside the item window for the element, the window expands and all the elements to be

When CA-Easytrieve/Plus expands the size of a window, CA-Easytrieve/Plus ensures that a window does not overlap another window. This technique ensures that no two elements on the same print line ever overlap.