BackPrevious Page Next PageNext

Datasets

Creating datasets in a report

Managing the datasets in a report

Setting properties of the datasets in a report

Customizing field display names for datasets in a report

When you create data components in a report, datasets are created. A dataset is the set of data built from the result of a query, stored procedure, imported SQL, imported APE, user defined data source, hierarchical data source or business view, and can optionally have filters applied to it. A dataset has a name, which by default is the name of the data resource on which it is created. A dataset built on data resource such as query, stored procedure, imported SQL, imported APE, UDS and HDS can contain all the DBFields in the data resource, as well as the parameters and valid formulas of these DBFields in the same catalog data source as the data resource; a dataset created from a business view can contain only view elements and dynamic resources.

Datasets in a page report created using query resources and web report can be shared by different data components. Having data components in the same report use an existing dataset whenever possible will have a dramatic effect on the performance of your reports in the runtime environment. This is because each dataset is created by running a query against the database, and that is the most expensive part of running a report in terms of execution time. Even when two datasets are based on the same query JReport will still run the query separately for each dataset.

Creating datasets in a report

You have the following methods to create datasets in a report:

Note: If a dataset is created on a hierarchical data source, when you use the dataset to create data components, pay attention to the unique features of HDS.

Managing the datasets in a report

You can manage the datasets in a report with the Manage Datasets dialog, for example, you can add more data fields to the datasets, filter the datasets, rename the datasets, and so on. However this feature is supported only for query based page reports and library components.

To manage the datasets in a report, open the report, then click Report > Manage Datasets to display the Manage Datasets dialog.

Manage Datasets dialog

You can manage the datasets in a report as follows:

Setting properties of the datasets in a report

Each dataset in a query based page report and library component has its own node in the Report Inspector. You can edit the properties there to make the dataset better serve the data components created on it.

To edit properties of a dataset in a report:

  1. In the Report Inspector, select the name of the dataset under the Datasets node for a page report or Data Source node for a library component.

    Datasets in Report Inspector

  2. In the Properties sheet, edit the properties of the dataset as required.

    For example, you can apply a cached query result file to the dataset, specify the data buffer size for the dataset to improve performance, apply record-level security for the data components using the dataset.

Customizing field display names for datasets in a report

For datasets created on query resources in a page report, JReport allows you to customize the display names of the data fields in the datasets, so that when end users run the page report in Page Report Studio and perform operations such as Sort, Filter on data components in the page report, they will be able to work with intuitive field names. You can also specify the actions in which the customized display names will participate for each data component in the page report.

  1. Open the page report that is created using query resources.
  2. Click Report > Edit Display Name to display the Edit Display Name dialog.

    Edit Display Name

  3. From the Report Dataset drop-down list, where all datasets used in the page report are listed, select a dataset and all the data fields in the dataset are then shown in the mapping name box.
  4. To make the resource names sort automatically, check the Auto Sort checkbox.
  5. Specify the display names for the data fields in the Display Name column. A formula can be selected as the display name of the data field.
  6. Select another dataset and repeat the above steps to edit the display names of data fields in it.
  7. If required, you can click the Advanced button to further customize the display names for data components in the page report using the Edit Display Name for Component dialog.

    Edit Display Name for Component

  8. From the Component drop-down list, select the data component in the page report you want to customize.

    Tip: You can also right-click a data component created using query resource in a page report and then select Edit Display Name from the shortcut menu to display the Edit Display Name for Component dialog. However, if the dialog is opened in this way, only the component you right-click on will be listed in the Component drop-down list.

  9. In the action columns, check the corresponding checkboxes to indicate whether the actions are enabled for the data fields. Check the checkbox on the action column header if you want the corresponding action to be enabled for all data fields. If any action is not supported on the selected data component, the corresponding column will be disabled.

    When an action is checked for a data field, the field's display name instead of mapping name will be shown in the corresponding dialog or submenu in Page Report Studio. If you uncheck the box for any field in any action column, the field will not be available for the action. Moreover, if you set the display name of any field to be blank in the Edit Display Name dialog, all actions will be disabled for the field, which means end users will not be able to perform all these actions on the field in Page Report Studio.

  10. Upon finishing, click OK to accept the changes.

Note: If you set the display name of any data field to be blank, the field will not be shown in the lists where display names are displayed in Page Report Studio.

BackPrevious Page Next PageNext