The anchors are used to define the behavior of controls during a resize operation.

In a report, the anchoring is used to adapt the document when the user switches from Portrait mode to Landscape mode or when the paper format changes (A4, A3, ...).

For example, a "tight" print in A4 format will be perfectly legible in A3 format.

The management of control anchoring includes two parameters:

The anchor of control: this parameter is used to define the modification that will be applied to the control according to the change of report size. The control can be moved to the left, its size can be increased in width.

The anchor rate: this parameter is used to manage the percentage by which the control is moved or stretched. This parameter allows you to:

keep a control centered in width in the report regardless of its size,

proportionally enlarge some report controls.

These parameters can be configured in the report editor.

Notes:

Several WLanguage properties allow you to find out the anchoring characteristics defined in the editor. These properties cannot be used to modify the anchors defined in the editor.

The anchoring is available for the controls only (it is not available for the blocks).

How to proceed?

Anchoring a control in a report

To anchor a control in a report:

Select one or more controls to anchor.

Define the anchoring of controls:

in the "GUI" tab of the description window of control ("Description" from the popup menu of control),

via "Anchor" from the popup menu of the control.

Note: If the print mode of the report is not suited for the anchors, the print mode can be changed from this window directly.

In this window, choose the type of anchoring that will be used. The most common options are represented by icons:

No anchor

The control is not modified when the report is resized. No anchoring option is selected.

Width

The control stretches to the right when the report is enlarged. To change the speed at which a control stretches in relation to the report, use the anchor rate in width.

Right

The controls moves to the right when the report is enlarged. To make the control move slower or faster, use the anchor rate to right.

Centered in width

The control remains centered in width in the report regardless of the report width.

No anchor

The control is not modified when the report is resized. No anchoring option is selected.

Width

The control stretches to the right when the report is enlarged. To change the speed at which a control stretches in relation to the report, use the anchor rate in width.

Right

The controls moves to the right when the report is enlarged. To make the control move slower or faster, use the anchor rate to right.

Centered in width

The control remains centered in width in the report regardless of the report width.

Versions 20 and laterHeight

New in version 20Height

Height

The control stretches toward the bottom when the report height is enlarged. To change the speed at which a control stretches in relation to the report, use the anchor rate in height.

Versions 20 and laterWidth and Height

New in version 20Width and Height

Width and Height

The control stretches to the right and to the bottom when the report is enlarged. To change the speed at which a control stretches in relation to the report, use the anchor rate in height and the anchor rate in width.

Versions 20 and laterHeight and Right

New in version 20Height and Right

Height and Right

The control stretches toward the bottom and moves toward the right when the report is enlarged. To make the control move slower or faster, use the anchor rate to right. To change the speed at which a control stretches in relation to the report, use the anchor rate in height.

Versions 20 and laterBottom

New in version 20Bottom

Bottom

The control moves to the bottom when the report is enlarged toward the bottom. To make the control move slower or faster, use the anchor rate to bottom.

Versions 20 and laterWidth and Bottom

New in version 20Width and Bottom

Width and Bottom

The control stretches to the right and moves to the bottom when the report is enlarged. To make the control move slower or faster, use the anchor rate to bottom. To change the speed at which a control stretches in relation to the report, use the anchor rate in width.

Versions 20 and laterRight and Bottom

New in version 20Right and Bottom

Right and Bottom

The control moves to the right and to the bottom when the report is enlarged. To make the control move slower or faster, use the anchor rate to bottom and the anchor rate to right.

Versions 20 and laterHorizontally centered at bottom

New in version 20Horizontally centered at bottom

Horizontally centered at bottom

The control remains centered in width in the report regardless of the report width. However, the control is anchored to the right and it moves to the right when the report is enlarged. To make the control move slower or faster, use the anchor rate to bottom.

Versions 20 and laterCentered in height

New in version 20Centered in height

Centered in height

The control remains centered in height inside the report regardless of the report height.

Versions 20 and laterVertically centered to right

New in version 20Vertically centered to right

Vertically centered to right

The control remains centered in height inside the report regardless of the report height. However, the control is anchored to the right and it moves to the right when the report is enlarged. To make the control move slower or faster, use the anchor rate to right.

Versions 20 and laterCentered

New in version 20Centered

Centered

The control remains centered in height and in width inside the report regardless of the report size.

Define (if necessary) the different anchor rates.

Validate.

To display the anchoring markers in the control (red arrows), on the "Display" pane, in the "Viewing" group, check "Anchors and self-extensibility".

Notes:

The self-expandable controls are displayed in the report editor with a specific sign: a line with a down arrow.

At run time, a self-expandable control will be automatically enlarged in height if its size is too small to display its entire content.

Print mode of a report and anchoring

By default, the anchors are not automatically enabled in the reports.

A report can be printed according to three print modes:

Print the report as it is: In this case, the content exceeding the report size will not be printed.

Automatically stretch or reduce to the supported format: The report is automatically stretched or reduced to adapt to the paper format.

Stretch or reduce by applying the anchors: The report is adapted to the selected format by using the defined anchors.

These print modes can be selected or modified in the "Options" tab of the description window of the report.

Print preview of a report with anchoring

When anchors are defined in a report, the print preview automatically proposes a list used to choose the display mode of the report.

Choice found in the "Print" pane of the ribbon

The proposed choices correspond to:

the default paper format of the report proposed in portrait mode and in landscape mode.