Use this tab to display the layouts of a report. Through the layout
shortcut menu commands, you can perform these actions:
- Add or remove layouts.
- Edit the selected layout.
- Edit all layouts
simultaneously.
- Copy a layout from another
report.
- View the selected layout.
For more information on the Layout commands, see
Layout shortcut menu.
The tab displays a list of all layouts, by their name, used by the
report.
Here, you can remove, add/edit layouts, and copy a layout from another
report. If you add a layout type that already exists, ensure the sequence
number of the new layout is different from sequence number of the existing
layouts.
For more information about previous layout operations, see
Add and remove layouts.
The
Layouts list displays the
following layout attributes:
-
Layout Type
-
Field Name
-
No
-
Output Expression
Add and remove layouts
To add a layout:
- Click
Add. Alternatively, press
Alt+A or right-click in the
Layouts list and select
.
-
Specify the properties of the new layout. See the field help.
- When you finished adding
layouts, refresh the
Layouts list, so the new
layouts are displayed at the appropriate positions. Right-click in the
Layouts list and, on the
shortcut menu, select
.
To remove a layout:
- Right-click a layout and
select
. Alternatively,
select a layout and press Alt+DEL.
- Right-click in the
Layouts list and select
.
- Layouts
-
- Layout Type
- The layout type.
-
Note: You can select a layout type from the list.
When you select a layout type that is already used, specify a sequence number
different from the numbers of the used layouts.
-
Allowed values:
-
A report can contain the following layout types:
Before.report
|
Layouts of this type are printed once at the beginning of the
report. Use this layout to present information about the report. For example,
the title page of the report.
|
Header
|
Header layouts are printed at the top of every page.
|
Before.field
|
You
can define this layout for each input field for which a sort mode is defined.
Each time the value of the sorted input field changes, this layout is printed
before the Detail lines. In this way the records are grouped.
If a group of records spans more than one page,
the Before.field layout is repeated at the top of the new page (following the
header).
To suppress automatic printing at the top of
every page, use
lattr.break as an output
expression.
lattr.break is a predefined
variable that contains the value 1 (true) when the sort field changes. When you
use this output expression, the layout is only printed when the input variable
is changed.
To define multiple grouping levels in a report:
- On the Input Fields tab,
define a Sort Mode and a Sort Seq. for each input
field by which the records must be grouped.
- Define a Before.field for each of
these sort fields.
An example of multiple grouping levels is to
group Purchase Order records first by buyer, and then by buy-from business
partner.
The order of sorting and grouping depends on the
sort sequence that was specified. This is the sequence of the fields in the
Input
Fields list.
|
Detail
|
Detail layouts are used for the individual records included in
the body of the report. They are printed every time data is sent to the report.
|
After.field
|
You
can define this layout for each input field for which a Sort Mode is defined in
the Input Fields tab. Each time the value of the sorted input field changes,
the layout is printed after the detail lines. In this layout, the presorted
input field still contains the old value.
Among other things, this layout can be used to
print totals for a particular group of detail lines.
|
Footer
|
Footer layouts are printed at the bottom of each page.
This layout is used to print this information:
- Titles
- Page
numbers
- Page
totals
|
After.report
|
This
layout is only printed at the end of the report, and after all other layouts.
If this layout does not fill a complete page, the footer layout is printed at
the bottom of the page, where the After.report layout(s) is printed.
|
-
Note: The
Field Name field
is applicable only if you select Before.field or After.field layouts.
- Field Name
- The name of an input field used to activate Before.field
and After.field layouts. When the field value changes, the layout is printed.
-
Note: Select a field from the list.
-
Allowed values:
-
You can only specify fields, which are defined as a sorted
input field in the
Input Fields tab
of the report editor.
The
Field Name
attribute only applies to Before.field and After.field layouts.
- No.
- The sequence number of the layout.
-
You can define more than one layout per Layout/Fieldname
combination. The layouts of the same Layout/Fieldname are printed in the order
of the sequence number of the layouts.
There are two reasons to define more than 1 layout per
Layout/Fieldname combination:
-
Note: You can only add a layout type that already
exists in the current report if the sequence number of the new layout differs
from that of the existing layouts.
- Output Expression
- An expression which is evaluated at runtime. The result is
always true or false. The expression syntax is equal to the 3GL syntax. When a
layout must be printed, the system evaluates the output condition of the
layout. If the result is true, the layout is printed.
-
Example:
-
Output Expression
|
Print result
|
1
|
Layout is always printed.
|
0
|
Layout is never printed.
|
print.detail = 1 or print.detail =
2
|
Layout is printed if variable print.detail is 1 or 2.
|
strip$(tdsls041.cprj) <> ""
|
Layout is printed if field tdsls041.cprj is not empty.
|
-
Allowed values:
-
The variables used in the output expression must be
defined as input fields for the report.
-
Allowed values:
The default value is 1. Therefore, the expression is
always true and
LN
will print the layout (if not prevented by other controls).
- Format
-
- Different Font
- The font in which the layout is printed.
-
Note: This field only applies to a report that
can have different fonts. You can only specify another font if you previously
selected
on the
Overview tab of
the
Report Editor.
-
Allowed values:
-
These fonts can be defined in the printer information
files of the printer being used.
To specify a value for this field, select a font from the
drop-down list.
For example, you can choose one of these fonts:
- Large (10 cpi)
- Small (17.1
cpi)
- Middle (12
cpi)
- Double Wide
- Near Letter
Quality
- Italic
- Superscript
- This number indicates how many extra lines are required for
the layout on the same page.
-
Before printing a layout, the report writer calculates the
free space at the current page. If the layout does not fit on the same page,
the layout is printed on a new page. If the value of this field is 0, only the
number of lines of the layout itself is taken into account. With this field you
can increase the number of extra free lines for the layout. This can be useful
if you want to print at least 2 detail layouts on the same page together with a
Before.field layout.
-
Note: This field does not apply to the Header and
the Footer layout types.
-
Allowed values:
-
A whole number in the range 1-99.
- Multi columns
- This field indicates whether the report layout must be
printed in more than one column or not.
-
The number of columns depends on the size of the layout
and the paper width. Change the layout size with the command <Esc>[S] in
the report layout editor.
-
Allowed values:
- Select one of the following values from the drop-down
list:
- None
- Vertical Order
- Horizontal
Order
- New Page
-
If this check box is selected,
the report layout is printed on a new page. Skipping to a new page always
causes printing of present Header, Footer and Before.field layout types. If the
current line is at the top of the page, the page command is ignored.
-
Note: This field does not apply to Header and
Footer layouts.
- Number of Columns
- The number of characters or positions per line.
-
Allowed values:
-
This display field is read-only. This number is calculated
automatically.
- Number of Rows
- The number of lines of the report layout.
-
Allowed values:
-
This display field is read-only. This number is calculated
automatically.