
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 report other than in the tabular layout, a dataset is created at the same time, either in blank or containing some data fields, depending on whether data fields are added to the report.
- If you specify to create the report in one of the following layout: Standard Banded Report, Table Report, Chart Report, Crosstab Report, Horizontal Banded Report or Mailing Label Report, in the Data screen of the corresponding report wizard:
- Check the New radio button and specify the source on which the dataset will be created. Then,
- If you click Finish directly in the report wizard, a blank dataset will be created.
- If you go on to the next screens of the report wizard and select some data fields to display in the report, the dataset will contain the selected data fields.
- Check the Existing radio button and click <Add Dataset...> in the dataset tree. In the New Dataset dialog, specify the source on which the dataset will be created, give a name for it, then click OK to create the dataset.
- If you click Finish directly in the report wizard, the dataset will be blank.
- If you go on to the next screens of the report wizard and select some data fields to display in the report, the dataset will contain the selected data fields.
- If you choose to create a blank report, you will be prompted with the Choose Data dialog to specify a dataset for the report.
- Check the New radio button and specify the source on which the dataset will be created. Then click OK, and a blank dataset will be created.
- Check the Existing radio button and click <Add Dataset...> in the dataset tree. In the New Dataset dialog, specify the source on which the dataset will be created, give a name for it, then click OK. A blank dataset will be created.
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 a blank 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 a blank dataset will be created.
