### Dataset

The properties of a dataset are:

Property Name | Description
--- | ---
General
Class Type | Indicates the class type of the object. This property is read only.
Others
Data Driver | Specifies the cached query result file as the data resource. Usually used for support purpose. The input format for cached query result file is as follows: `jrquery:/jet.universe.resultfile.UResultFileResultSet;Fullpath_of_cached_query_result` Data type: String
Data Source Name | Specifies the name of the data source. Data type: String
Maximum Records | Specifies the maximum number of records you want to display for all of the data containers using this dataset. The default is to display all the records. Data type: Integer
Query Editor | Edits the dataset if it is based on a query. Click to display the Query Editor to edit the query as required.
Query Name | Shows the name of the query in use. This property is read only.
Security
Function | Specifies a formula to control the record level security. Data type: String
Record Security | Specifies the record level security for the dataset. Click to open the Record Level Security Information dialog in which to set the security settings.
Security Policy Name | Specifies the name of the data source security imported from the catalog. Data type: String
Data Buffer
Maximum Page Number | Specifies the maximum number of pages in the data buffer. Data type: Integer
Records per Page | Specifies the number of records in each page in the data buffer. Data type: Integer

#### Data Driver

This property is usually for support purpose. When you have problems with your report, we need to run it and reproduce the problem so as to fix it. Sometimes, the database is too large to be sent. If this property is correctly set, then JReport engine will choose that query file to view the report instead of using JDBC driver or User Data Source to run the report.

To generate the cached query result, in the Catalog Browser, right-click the query of your report, click Create Cached Query Result, you can specify the folder and file name with or without extension (.txt).

#### Data Buffer

You can improve report performance by setting data buffer size. By default, the size of one data buffer is 2M. When data exceeds the default size, they will be written on the disk, which will slow down the data processing. However, you may have enough memory which is much larger than the default buffer size, so that you can use the memory resource efficiently to achieve better performance. JReport enables you to set the data buffer size by specifying the two properties of a dataset: Records per Page and Maximum Page Number.

When a buffer is defined, JReport divides it into many pages and allocates records to be stored in the pages. Data will be transferred with the unit of page. The data buffer size is determined by values of maximum number of pages in the buffer and the number of records in every page. The default maximum page number in the data buffer is 2048, page size is 1k(1024 bytes).

The value of Maximum Page Number should be changed with different datasets. Generally speaking, it can be 1 ~ 50.

Notes:

- The properties should be set according to different databases, namely, different databases may have different configurations of data buffer.
- If the report runs in a different environment, the properties should be specified again.
- If the report contains subreports, the data buffer for subreports should also be configured to improve performance.
- As tested, if enough physical memory is available, and you know the total number of records in the dataset, then you can set Records per Page approximate to the total number of records to achieve better performance. Maximum Page Number is related to the report, and should not be very large.
- The size of data buffer should be less than the available physical memory.
- The Heap Size should be set when the data buffer is quite large.