Skip to content

Graphs, Tables and KPI's

Adding KPI, table and graph widgets are part of the report scripting functionality.

Many of the scripts in these chapters uses bootstrap code to set width of the elements used. Page width is divided in 12 parts, so 4 equal parts are 3-3-3-3 etc. The different screen sizes can be used to create a new row in the layout. Using LG3 (4 parts)on a large screen might look better in two rows on an ipad MD6 (2 parts).

  • XS: Size on xtra small (phone screen) XS1 to XS12 (XS12 recommended) < 768 pixels.
  • SM: Size on devices with screen width > XS, < 992 px.
  • MD: Size on devices with screen width > SM, < 1200 px.
  • LG: Size on devices with screen width > MD.

  • All methods are executed on the $olap object.
  • The data for any method is retrieved from an external source, typically a table or view in a specific database, that is used for the associated report. Columns from this source are referenced using square brackets (e.g., [accounted_amount_dcur]). If a different data source is required, it can be specified with methods.
  • Several predefined functions (e.g., SUM()), methods (e.g., ?period.getYear()), and SQL expressions (e.g., CASE WHEN [...] THEN [...]) can be used within arguments to process and transform data dynamically.
  • Do not place comments (e.g., //) inside methods, as this will cause them to silently fail.
  • When working with expressions that involve multiple aggregation functions, it is important to remember that aggregations are always performed before the expression itself is evaluated. This means that conditions or counts based on aggregated results (e.g., “number of projects with a negative total”) require pre-aggregated data or an additional query step in order to produce correct results.