Editing a report

After a report is built up, you can make further modifications to the report, in order to make it better satisfy your requirements. In JReport, to edit a report is actually to edit the components in it. This section only lists the basic operations used for editing a 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 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 report

After the initial design work of a report, you are also free to insert more components into the report according to your requirements. 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 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 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.

Changing the position of components

The position of a component in a report can be Static, Relative or Absolute. To change the position of a component, right-click it and then on the shortcut, select the required item from the Position submenu.

In addition, when the position of some components in a report is set to Absolute, these components will be overlapped each other. You can decide the display order of the components by moving them backwards or forwards. For details, see Position property.

Showing components in a TOC tree

Some components in a report can be set up to show in a table of contents. Then when previewing the report in JReport Format, viewing it in JReport Web, 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 Report Inspector.
  2. Set its TOC Anchor property to true.
  3. Specify its display value for it by setting the Anchor Display Value property.

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

Deleting components from a report

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