BackPrevious Page Next PageNext

Editing Reports

Inserting other components into a report

Duplicating components

Resizing components

Deleting components from a report

Editing component properties

Changing component position

Changing component display type

Adding links in a report

Applying conditional formats in a report

Predefining sort and filter conditions in a page report

You can make further modifications to a report at any time in order to make it better satisfy your requirements. In JReport Designer, to edit a report is actually to edit the components in it. This document shows editing the components generally. For more details about working with different components, refer to the specific section of each component in the Components chapter.

Inserting other components into a report

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

Duplicating 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).
  3. In the required position, right-click your mouse, and then click Paste.

Resizing components

  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.

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:

Editing component properties

Each component has a set of properties that can be used to customize the appearance and behavior of the component.

To edit the properties of a component, select the component in the report or from the report structure tree in the Report Inspector, then in the Properties sheet modify the property values as required. See Report Object Properties for detailed information about the properties.

After editing the properties you can save them as a CSS style for future use if needed.

Changing component position

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, text boxes and KPIs themselves in JReport can also act as flow layout containers.

In a flow layout container, objects are positioned relative to one another or absolutely based on their Position property value:

You can change the Position property of a component in any of the following ways:

Notes:

Changing component display type

Display Type allows you to map a component such as a label to other value or image to be displayed instead in a report. It is supported on the following components: Label, DBField, Formula Field, Parameter Field, Summary Field and Special Field.

The display types JReport Designer provides include: Text, Image, Barcode, Rank, Text Field, Hidden Field, Text Area, Checkbox, Radio Button, Image Button, Button, List, and Drop-down List.

For details about the usage of this feature, see Changing the Display Type of Labels.

Adding links in a report

A report can be linked with other reports, locations specified by URLs, e-mail addresses, or Blob data type fields, so that at runtime end users can gain access to the linked targets by clicking the corresponding trigger objects in the report.

In JReport Designer, the following components can be used as the trigger objects of links: Label, DBField, Formula Field, Parameter Field, Summary Field, Special Field, Image and Chart. You can create either simple links or conditional links in a report. With conditional link, different targets can be loaded based on different conditions.

For details about how to add links in a report, see Binding Links to Labels.

Applying conditional formats in a report

Conditional format enables you to highlight the values that are important in a report or might need to be acted on by the end users.

You can apply conditional formats on the following data fields in a report: DBField, Formula Field, Parameter Field, Summary Field. For more information, see Adding conditional formats to DBFields.

Areas in shape maps and markers in geographic maps can also be applied with conditional formats.

In a chart, you can add conditional color fills to apply different color patterns to its data markers based on different value ranges.

Predefining sort and filter conditions in a page report

For page reports creating using query resources, you can predefine sort and filter conditions on the charts, tables, crosstabs and banded objects in them so that when the page reports are published to JReport Server and loaded in Page Report Studio, data in the specified data components in the reports will be displayed in the order you prefer, or be narrowed down as you desire.

The predefined sort and filter conditions in a page report are based on the result set of all the other sort and filter conditions applied to the report.

To predefine sort conditions in a report:

  1. Select a chart, table, crosstab or banded object in the report to which the sort conditions will be applied.
  2. Click Report > Edit Sort & Filter to show the Edit Sort and Filter dialog. The Sort tab is active by default.

    Edit Sort and Filter dialog - Sort

  3. In the Fields box, all the fields in the dataset the data component uses are displayed. Select the field by which to sort the data from the box and click Add button to add it to the Sort By box. To sort by two or more fields, select all of them and then click Add button.

    If the Customize Display Name feature hasn't been applied to the dataset the data component uses, no fields are available in the Fields box. In this case, click the Edit Display Name button in the dialog first to enable the feature on the dataset.

  4. To modify the sort direction for a field, select Sort Ascending button (ascending) or Sort Descending button (descending) in the Direction column.
  5. To change the sort priority of the fields, select the field in the Sort By box, and then click Move Up button or Move Down button to move it up or down.
  6. Click OK to accept the settings.

To predefine filter conditions in a report:

  1. Select a chart, table, crosstab or banded object in the report to which the filter conditions will be applied.
  2. Click Report > Edit Sort & Filter to show the Edit Sort and Filter dialog, then switch to the Filter tab.

    Edit Sort and Filter dialog - Filter

  3. Click the Add Condition button to add a condition line.
  4. From the field drop-down list, select the field on which the filter will be based.

    If the Customize Display Name feature hasn't been applied to the dataset the data component uses, no fields are available in the field drop-down list. In this case, click the Edit Display Name button in the dialog first to enable the feature on the dataset.

  5. From the operator drop-down list, set the operator with which to compose the filter expression.
  6. In the value combo box, type the value of how to filter the field or select the value from the drop-down list.
  7. Click Add Condition to add more condition lines and define the logic between the condition lines.

    To make some condition lines grouped, select them and click the Group button, then the selected condition lines will be added in one group and work as one line of filter expression. Conditions and groups together can be further grouped. To take any condition or group in a group out, select it and click Ungroup.

    To adjust the priority of the condition lines, select it and click the Up or Down button.

    To delete a condition line, select it and click the Delete button.

  8. Click OK to save the condition.

Note: The predefined sort and filter conditions will also affect the preview result in JReport Designer, and the result produced from being run in other formats besides Page Report Result.

BackPrevious Page Next PageNext