I. Description
Query the database table through the dataset. When there is a large amount of data, it will be slow to expand the dataset;
The template defines many datasets. When the dataset is executed, a data connection is created, and the database connection pool is full.
The above questions are all related to the execution of the dataset. When will the dataset be executed?
II. When will the dataset be executed?
1) Will it be executed when the dataset is defined?
Creating data and editing SQL query statements will not execute the dataset. It will only be executed when the defined dataset is previewed.
2) Why is it slow to expand the dataset when the amount of data is large?
SQL statements will be executed when the data set is expanded, so that the column names of the data set can be obtained, but the complete SQL statement will not be executed when the dataset is expanded. Only the first few items will be executed to get the column names, which greatly improves the designer's ability to get the dataset column names, and improve experience of users.
3) Will the dataset not used in the template be executed when previewing?
Multiple datasets are defined in the template, but some are not used, and will not be executed when previewing.
When FR is previewing the report, only the cells that use the dataset will execute the dataset. If a data column is bound to cell B3, the dataset will only be executed when the template preview is executed to cell B3. At this time, a data connection will be created. After executing the dataset, the connection will be automatically released.
The dataset will only be executed once, if other cells use other columns of the dataset, it will not be executed again.