Previous sections have presented a variety of techniques for displaying data within tables, including table data binding, crosstab tables, and freehand tables. However, these methods may not be flexible enough to create very specific layouts, display hybrid data from multiple queries, or address other advanced display needs. For such cases, you can gain greater flexibility by using a Formula Table.
Note: To use Formula Tables effectively, you should possess a working knowledge of JavaScript.
![]() |
Read how InetSoft was rated #3 for implementation in G2 Crowd's user survey-based index. |
A formula table is a regular table with no data binding. Formula tables bridge the gap between spreadsheets applications (like Excel) and traditional reporting tools. In a spreadsheet, we usually fill a column with data, and then define summary formulas which reference different cells. A formula table is similar. It is not explicitly bound to a query; instead we have to extract parts of a query result set and fill the header rows and header columns of the table dynamically. We can then reference these filled cells in formulas to perform all our statistical calculations. Formula tables can thus be used to create real-time, spreadsheet-like reports with very specific and complex layouts, grouping of data, and aggregation which are commonly required in accounting and financial applications.
![]() |
View live interactive examples in InetSoft's dashboard and visualization gallery. |
The fundamental approach to creating formula tables is as follows:
![]() |
View a 2-minute demonstration of InetSoft's easy, agile, and robust BI software. |
If you assign a formula to a cell of a table, and this formula returns an array of values, you can specify that the cell should expand in the horizontal/vertical direction to ‘fill’ the table with the values of the array.
Walkthrough
We will illustrate in detail how to create a formula table, and ‘fill’ it with dynamically-generated row and column headers extracted from a query.
var q = runQuery('Order details');
Note: q['Company'] will return an array of records under the 'Company' column of the query result set. For more information on how to extract and manipulate data from a query result set, refer to the Formula Tables section of the Report Scripting Guide.
Previous: Non-Flow Page Areas in a Report |
Next: Report Viewing
|