Making simple modifications to components

This section introduces the general actions that you can perform on the report components.

Resizing a component and its elements

To resize a component, click anywhere in the component, then you will see it is surrounded by a rectangle with resizing handles. Point to a handle, when the mouse pointer turns to a double-headed arrow, you can drag the handle to resize the component.

To adjust the width of a column in a table, point to the right boundary of the column, when the mouse pointer becomes a double-headed arrow, drag the handle to resize the column.

To adjust the row height in a table, point to the lower boundary of a row, when the mouse pointer becomes a double-headed arrow, drag the handle to resize the row height. Then all the other rows of the same role will be resized too. For example, if a detail row is resized, all rows in the detail area will be resized. If a group row is resized, all rows of the group will be resized, while the other groups' rows keep unchanged.

To resize the column or row in a crosstab, drag the right or lower boundary. Then all the columns or rows of the same role will change too.

For a tabular, point to the boundary between two cells and the mouse pointer will become a double-headed arrow, you can then drag the boundary to adjust the size of the related cells.

Hiding/showing a component

To hide a component, right-click on the component, then click Hide on the shortcut menu.

For a row, a column, or a header/footer in a table, there are two ways to access the Hide option:

To show the hidden components, click Menu > Edit > Unhide Components and then select the desired components to show from the drop-down list. Another way to show the component after hiding is Undo.

For any component whose parent doesn't have a data source, for example, a label in the tabular cell of a web report, you can also use the Show Objects dialog to show or hide them. To do this:

  1. Click the Show Objects button on the toolbar. The Show Objects dialog appears. See the dialog.
  2. Select true or false from the Invisible drop-down list to show or hide the corresponding component. You can also use a formula to control whether or not to to show the component.
  3. When done, click OK to accept the settings.

Using formulas to control showing or hiding components

You can use formulas to control whether the components whose parents have no data source will be shown or not in a web report. However, before doing this, you need to first bind a data source to the web report, then create dynamic formulas of Boolean type based on this data source and use these formulas to control the Invisible property of the required components in the Show Objects dialog. A return value of true will hide the component.

To use formulas to control which components to show in a web report, follow the steps below:

  1. Click Menu > Edit > Bind Data. The Bind Data dialog appears. See the dialog.
  2. Select a business view in the current catalog.
  3. Click OK to bind the business view to the web report.
  4. Click any blank place in the report. The business view bound to the report will be displayed in the Resources panel.
  5. Follow the steps in Creating and using dynamic formulas to create the formulas you need.
  6. Click the Show Objects button on the toolbar to display the Show Objects dialog.
  7. Click beside the Invisible property of the component which you want to control by formula and select the required formula from the drop-down list. Repeat this to select formulas for other components.
  8. Click OK to confirm the settings. Then whether the components will be shown or not will then be determined by the return value of the specified formulas.

If you set the Invisible property of a component to true using a formula, the object will not be listed in the Menu > Edit > Unhide Components drop-down list. You can show it only by using the Show Objects dialog. Meanwhile, once the Invisible property of a component in a web report is controlled by a formula, the data source bound to the web report cannot be changed unless you remove the relationship between the formula and the property.

For a web report created in JReport Designer, if it has been bound with a data source before being published to JReport Server, and some dynamic formulas have been created based on this data source:

Editing a component

Modifying component properties

You can modify object properties with the corresponding properties dialog.

Deleting a component

A component can be removed from the report if it is no longer required. To delete a component, right-click on the component, then use Delete on the shortcut menu. Then, a message will prompt, asking for your confirmation. Click Yes in the message box so as to remove the component.

To delete a table column, take one of the following:

Note: In a web report, there must be one and only one tabular, so you cannot either insert another tabular or delete the current tabular.