Component Structure and Layout of Forms and Reports

For form and report components, the data structure and layout are defined together in the Define Frames worksheet of the component editor.

The worksheet provides a graphical editor in which both data objects and layout objects are represented by frames, which are drawn on the Canvas.

Frames

Frames represent component entities, occurrences, fields, labels, areas, lines, and print frames (headers, footers, and page breaks).

The frame itself is not visible in the runtime component unless you explicitly enable a border, background color, or background image (depending on the object).

To define the component structure and layout, you select an object in the Resource Browser, then draw it as a rectangle onto the Canvas. (You do not drag and drop the object onto the canvas.)

By drawing one frame inside another, you define the hierarchical structure of the component. Thus, related entities are nested within each other, and component fields can only be defined inside entities.

Form in Development

Define Frames editor showing data structure and layout with entity, field, label, and line frames

If a relationship has been defined between modeled entities, you need to draw them inside each other on the component. This defines the physical path from the parent entity to each child entity. As a result, you may have to draw an entity even if it is not visible to the user.

Entities that have no relationship with each other should not be nested, but positioned separately.

Note:  For form components, it is possible to change the layout at runtime using ProcScript, but, the layout in the development object always reflects the data structure.

Form at Runtime

Sample form at runtime

Layout of Forms and Reports

For a form, the Canvas represents the physical dimensions and location of the component. It can be resized as required and will reflect properties that are set for objects, either in the usys.ini file or in the component itself.

You can use split bars to split the form into resizable areas. Fields and areas that are attached to a window or split bar can then expand or move when the component or area is resized.. You can also define and format area frames to visually organize data into logical groups.For more information, see Split Bars and Area Frames and Lines.

In report components, you can define frames for headers and a footer to add page header an column headers and footer a footer at the end of the page. You can also add break frames to control conditional processing when a page break occurs. For more information, see Headers, Footers, and Break Frames .

Layout Independent of Structure

In forms, the runtime layout can be made independent of the data structure using the $paintedfieldproperties Proc function. For example, fields can be displayed outside the entity borders, or have overlapping entities and fields. This makes more efficient use of screen real estate and provides more flexibility in user interface design.

Although the data structure is not reflected in the runtime layout, it still governs Uniface processing and navigation. For example, when tabbing from one field to another, the sequence can be non-sequential and confusing to the user. If the order of fields does not match the order of fields in the data structure, you will need to program the correct navigation sequence in ProcScript.

For more information, see Changing Form Layout Dynamically .

Related Topics