Creating a dataset
The dataset is created automatically when a query is created and mapped to a report. You can also create a dataset independently, and then use it on a report later. This section describes the ways to create a dataset as follows:
Creating a dataset while creating report
When you create a data component in a page report tab or a library component, a dataset is created at the same time, either empty or containing some data fields, depending on whether data fields are added to the report.
Creating a dataset from the Report menu
To create a dataset by using the Report menu, follow the steps below:
- In JReport Designer, click Report > Dataset Management on the menu bar.
- In the Dataset Management dialog, click the Add button.
- In the New Dataset dialog, specify the data source on which the dataset will be built.
- Enter the name of the dataset in the New Dataset Name field.
- Click OK, and an empty dataset will be created.
Creating a dataset via the Resource View panel
Another way to create a dataset is by using the Resource View panel. To do this:
- In the Resource View panel, choose <Choose Data From...> from the dataset drop-down list.
- In the New Dataset dialog, specify the source on which the dataset will be built.
- Enter the name of the dataset in the New Dataset Name field.
- Click OK, and an empty dataset will be created.