# Incremental Loading

Incremental loading, or lazy loading, is a new feature in the v2017.2 release of Exago BI. Incremental loading allows you to set limits on the amount of data that is returned for each database query, and allows users to load reports incrementally, starting with a small set of rows, and adding more in steps as desired.

This can be useful for shortening the amount of time it takes a report to load and be usable. It can also help reduce contiguous load on a database which may improve load balancing performance.

Incremental loading is disabled by default. To enable it, the following configuration setting has been added which controls the maximum number of rows that can be returned for each database query:

( Database Settings ) Row Limit Step Size

This value sets the initial number of rows returned when the report is first executed, as well as the number of rows returned for each subsequent query.

Note: Incremental loading only applies to tables, views, and functions, by default. As of version 2018.1, programmable objects can also implement incremental loading using Programmable Object Parameters.

# Usage

With incremental loading enabled, when an ExpressView is run or a report is run in the Report Viewer (the interactive toolbar must be enabled), the report will only query the first number of rows specified in the configuration setting. If there are fewer rows than the full data set, an alert icon displays on the toolbar with the message "Truncated results displayed".

Alert icon in Report Viewer

Alert icon in ExpressView

Click the icon to show a menu with two options for retrieving more data:

- Generate +number to retrieve the next number of rows and add them to the report. (The number is determined by the aforementioned Row Limit Step Size setting).
- Generate All to get the full data set.

Note: Exporting a truncated report from the Report Viewer generates a file with only the existing rows.

Incremental loading has no effect on Dashboards, Chained Reports, or Scheduled Reports. Exporting from the Report Tree and Advanced Report Designer is not affected by incremental loading.

# Infinite Scrolling

Beginning with version 2018.1, Advanced and Express Reports now support Infinite Scrolling. With Incremental Loading enabled, scrolling or paging through the Report Viewer will cause additional rows to be loaded automatically as needed. This eliminates the additional step of having to manually load groups of rows at a time.

## Conditions for Infinite Scrolling

Infinite Scrolling requires reports to be designed in a certain manner. If the conditions are not met, users will need to manually step through the rows instead.

Reports must have a visible detail section, a defined sort order, and utilize a data source that supports range selection. Reports cannot contain interactive sorts or filters, Top N filters, crosstabs, collapsible groups, cross-source or Cartesian joins, in-memory aggregate functions such as RunningSum, custom functions, or server events that use the full data set (OnDataCombined).

Note: Default supported data sources include Oracle, MySQL, DB2, Informix, SQL Server, and Postgres.

## Range Method

The method used to construct the range limiting SQL statement depends on the data source, and can be customized by editing the `[WebApp]\Config\dbconfigs.json` and `[Scheduler]\dbconfigs.json` config files and setting the `"RowRangeMethodString"` property for each source. See Constants: Range Limit for valid values.