## Editing a page report

After a page report is built up, you can make further modifications to it, in order to make it better satisfy your requirements. In JReport, to edit a page report is actually to edit the components in its report tabs. This section only lists the basic operations used for editing a page report. For more details, you can refer to the specific section of each component in the chapter Components.

Note: The other way to edit a page report is by changing its properties in the Report Inspector. For detailed property descriptions, see Properties in the Report Inspector.

### Inserting other components into a page report

After the initial design work of a page report, you are also free to insert more components into it. To insert a component, you can either use the menu command or the Toolbox panel.

### Duplicating the components

You can duplicate any component in a page report without creating it the second time.

1. Select the component which you want to duplicate.
2. Right-click the component and then select Copy from the shortcut menu (or click the corresponding menu command or toolbar button).
3. In the required position, right-click your mouse, and then click Paste.

### Resizing the components

To resize a component in a page report, follow the steps below:

1. Select the component with the size you want to change, and the sizing handles will then appear along the four boundaries of the component.
2. Drag a sizing handle to resize the component to the required size.
3. Repeat the steps to resize other components.

### Showing components in a TOC tree

Some components in a page report can be set up to show in a table of contents. Then when previewing the report in JReport Format, viewing it in Page Report Studio, exporting it to PDF or HTML format, TOC Browser can be used to locate the corresponding component.

To show a component in a TOC tree:

1. Select the component node in the Report Inspector.
2. Set its TOC Anchor property to true.
3. Specify the display value for the anchor by setting the Anchor Display Value property.

JReport also allows you to specify other properties for a TOC tree, including its CSS style, colors and fonts. You can specify these properties by selecting the TOC node in the Report Inspector.

### Changing the position of components

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.

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 is 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 at which it is 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.

To change the position of a component:

- In the design area, right-click the component and on the shortcut menu, select the required item from the Position submenu.
- In the Report Inspector, select the node which represents the component, then set its Position property value as required.

### Deleting components from a page report

If you find any components contained in a page report are not required, you can use either of the following two ways to remove it from the report tab:

- In the Report Inspector, select the node which represents the component and press the Delete button on your keyboard.
- In the design area, right-click the component and select Delete from the shortcut menu.