## What is flow layout?

Report templates in JReport use a flow layout model. That is, paragraphs and components in the report body can flow from one page to another, maintaining their sequence, and the Position property controls whether a component is to be part of the flow, or separate from it. Besides the report body, tabular cells and text boxes themselves in JReport can also act as flow layout containers.

The following topics explain some features related to the flow layout model.

### The Position property

In a flow layout model, objects are positioned relative to one another or absolutely. The Position property controls the position of components in the flow layout container, which can be the report body, a tabular cell or a text box. Components placed in other areas, such as table cells or banded panels are not affected by the Position property.

The Position property can be one of the following values:

- Static
  The component will be positioned at the location in which it was inserted. The X and Y coordinate properties are disabled. The position of the component cannot be moved other than by having its insertion point moved. This can happen when the text flow preceding the insertion point expands.
- Relative
  The component will be positioned at an offset to the position in which it was inserted. The offset is determined by the X and Y coordinate property values. This value is not available for some kinds of component.
- Absolute
  The component will be located at the position specified by dragging and dropping or by setting its X and Y coordinate property values. The component insertion point does not change, for instance it is not affected by having text inserted before it.

  When components in the same flow layout container have their Position property value set to Absolute and overlap, you can set the display order of the objects by right-clicking the object and then selecting an item from the Move submenu (or clicking the corresponding move button on the Alignment toolbar).

  - Move Backward
    Moves the component one step towards the back.
  - Move to Back
    Moves the component to the back.
  - Move Forward
    Moves the component one step closer to the front.
  - Move to Front
    Moves the component to the front.

You can change the position of a component by changing its Position property in the Report Inspector, or by right-clicking the component and choosing the required item from the Position submenu.

Reference: For more information about this topic, see W3C standard about Visual formatting model.

### Paragraphs

Paragraphs are created when text is entered directly into a flow layout container, that is the report body, a tabular cell or a text box.

- To input text, simply position the mouse pointer in the report body, a tabular cell, or a text box and type the text.
- To create a new paragraph, press the Enter key on the keyboard.
- To exit a paragraph, click the mouse pointer anywhere outside of the paragraph.
- To format a paragraph, position the mouse pointer anywhere in the paragraph and click Paragraph on the shortcut menu. For details, refer to Formatting paragraphs in a text box.