## 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:

1. In JReport Designer, click Report > Dataset Management on the menu bar.
2. In the Dataset Management dialog, click the Add button.
3. In the New Dataset dialog, specify the data source on which the dataset will be built.
4. Enter the name of the dataset in the New Dataset Name field.
5. 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:

1. In the Resource View panel, choose <Choose Data From...> from the dataset drop-down list.
2. In the New Dataset dialog, specify the source on which the dataset will be built.
3. Enter the name of the dataset in the New Dataset Name field.
4. Click OK, and an empty dataset will be created.