Why do you need the Max (Data Rows) parameter?
Dashboard elements can contain an unlimited number of data lines. In reports, the template is filled with data when the report is built. However, for dashboards, there is no construction process. When you open a dashboard in the report designer, all data queries are executed, and the results are displayed in the dashboard elements. Consequently, if a dashboard has a large amount of data, all of it will be retrieved. This can make editing the dashboard difficult, depending on the PC's computing power, software, and environment. After thorough analysis, we decided to add the Max (Data Rows) parameter.How did the parameter work before?
In previous versions of Stimulsoft products, the Max (Data Rows) parameter functioned according to the following rules:- It was displayed in the Options menu only if the template contained a dashboard.
- Without restrictions (if the checkbox was unchecked);
- With a limit on the number of rows (if the checkbox was checked), where the specified number of rows was indicated as the value of the Max (Data Rows) parameter. Queries to data sources were executed, but when the result was returned, the report generator imposed a limit on the data rows.
This allowed users to open dashboards with millions of rows, for example, to change their design, even on low-power PCs. By setting the Max (Data Rows) parameter to 1, the dashboard in edit mode would load with only one data row. However, based on customer feedback, we decided to improve the operation of this parameter.
How does the parameter work now?
First, the Max (Data Rows) option is always displayed in the Report Designer Options menu, regardless of whether the template contains a dashboard. Secondly, a third parameter state has been added: when the checkbox is checked and the value is set to 0. In this case, when opening the dashboard, data queries are not executed. In other cases, if the checkbox is cleared or set with a value greater than 0, the behavior remains the same.Setting the parameter from code
You can also define the data row limit of StiDesigner embeddable components through code. To do this, set the MaxDataRowsOfDashboardElementInDesigner option to one of the following values:- null: no limits;
- 0: data is not requested in the dashboard editing mode and is not displayed in the dashboard elements;
- an integer: the specified number of data lines is displayed in the dashboard elements.
For C#:
//StiOptions.Designer.MaxDataRowsOfDashboardElementInDesigner = null;
//StiOptions.Designer.MaxDataRowsOfDashboardElementInDesigner = 0;
StiOptions.Designer.MaxDataRowsOfDashboardElementInDesigner = 500;
For JS:
//StiOptions.Designer.maxDataRowsOfDashboardElementInDesigner = null;
//StiOptions.Designer.maxDataRowsOfDashboardElementInDesigner = 0;
StiOptions.Designer.maxDataRowsOfDashboardElementInDesigner = 500;
Summary
- The Max (Data Rows) parameter is used for dashboards and only works in the report designer;
- The option to be in three states: without restrictions, with restrictions on data rows, without executing queries to the data storage;
- The installed settings do not apply to the dashboard elements when viewing it.