For performance reasons, you should avoid using too many large queries in one report. In addition, you should only run a query from script in cases where you cannot directly bind the query. In general, it is more efficient to use the 'Data Binding' dialog box to bind the query to an element, which allows the query to automatically run as part of report generation.
There are two complimentary methods for controlling and improving the performance of a report.
For example, if you only use the first few rows of a query, you should set a tight limit on the query size. You can make these settings at the query level or data binding level. See Advanced Toolbar Buttons in the Data Modeler to limit at query level, and Precautions and Safeguards in the Report Designer to limit at binding level.
Assume that you need to create a table containing sales summary information: Total sales volume, product with highest volume, and customer with the highest volume. There are several possible ways that you can design this table:
The following example illustrates the third approach. Assume that you have defined the following three simple queries in the Data Modeler:
Follow the steps below to create the table that displays these values:
var sales = runQuery('total sales'); var product = runQuery('top product'); var customer = runQuery('top customer'); table[0][1] = formatNumber(sales[1][0], "$#,###.00"); table[1][1] = product[1][0]; table[2][1] = customer[1][0];
Copyright © 2024, InetSoft Technology Corp.