Managing datasets
After you have created some datasets in a report, you can manage them according to your requirements, for example, you can add data fields to a dataset or filter the dataset. To do this, click Report > Dataset Management on the menu bar, and the Dataset Management dialog will be displayed, in which you can manage your datasets as required. See the dialog.
Adding data fields to a dataset
You can add additional data fields to a dataset, as long as they come from the source on which the dataset is created. To do this:
- In the Dataset List box of the Dataset Management dialog, select the dataset to which you want to add data fields.
- From the Available Resource box of the Data tab, select the required data fields and then click to add them to the dataset.
- When done, click OK to apply the changes and close the dialog box.
Filtering data fields in a dataset
- In the Dataset List box of the Dataset Management dialog, select the dataset with the data fields you want to filter, then click the Filter tab.
- Click the Add Condition button to add a condition line.
- Specify the field, operator and value accordingly to create the filter expression.
- Click Add Condition to define another condition line and set the relationship between the two lines if required.
- When done, click OK to apply the changes and close the dialog.
Note: You can use parameters to dynamically filter datasets as you do with queries. For details about parameter's usage on this, refer to Dynamically filtering queries.
Optimizing a dataset
You can enlarge or decrease the scope of retrieved data for a dataset, and therefore make a balanceable decision between better performance and special usage cases/demands. To do this:
- In the Dataset List box of the Dataset Management dialog, select the dataset with the name you want to optimize.
- Click the Optimize Dataset button.
- In the Optimize Dataset dialog, choose a retrieved data scope for the dataset.
- Only Columns Used in Report
Only data columns used in the current report are retrieved at runtime. This way ensures the best performance since the least data is retrieved.
- All Columns in Dataset
All data columns defined in the dataset are retrieved at runtime.
- All Columns in Query
All data columns in the query that the dataset is based on are retrieved at runtime. The performance of this way is not as good as the other two.
- Click OK to apply the settings and close the dialog.
Renaming a dataset
- In the Dataset List box of the Dataset Management dialog, select the dataset with the name you want to modify.
- Double-click the Name cell of the dataset.
- Input a new name in the cell and press Enter to apply the changes.
Note: You are not recommended to rename a dataset that has been used by other components randomly. Renaming a referenced dataset may cause reports which contain components based on the dataset not to work.
Removing a dataset
After you have created one or more datasets in a report, you can choose to remove them if they are no longer required for the report. To do this:
- In the Dataset List box of the Dataset Management dialog, specify the dataset you want to remove.
- Click the Remove button to remove the specified dataset.
- When done, click OK to apply the changes and close the dialog.
Note: If you remove a dataset directly in this way, any data containers created based on the dataset will not work. So, when you want to remove a dataset, it is recommended that you first remove the data containers which reference this dataset.
See also Dataset Management dialog for details about options in the dialog.