<< Click to display table of contents >>
Figure 16: subtotals
Path: <area><settings><subtotals> Note! Predefined example settings are available for subtotals in Input and Report Template management by selecting the Add Example option instead of Insert. Includes the settings for the subtotals function on a report. The subtotal feature sums the data in reports based on definition column values. A subtotal row is added to the report whenever the value in a defined definition column changes, and a grand total row (sum of all subtotals) is added at the end of the area. Note that the subtotal function does not sort the data, but the data should already be grouped in the template based on the definition column values. If the data is not grouped, a new subtotal row will be added whenever the data in the definition column changes. Subsequently, the total for one value in the definition column may be split on several subtotal rows. Subtotals can be applied to more than one definition column in the template, and the sum formula can be applied to multiple data columns. Note! When the subtotal functionality is used on 'predefined' type templates (see <datafield>) the following special cases apply. Visibility/hiding of subtotal rows: •Subtotal rows stay visible even when the hide_zerorows parameter is set to =true. •Subtotal rows are only visible when the Basic row set (all rows) is shown or there is no row set available. The subtotal rows are not included in any other row set. Due to the mechanism by which subtotal rows are created the subtotal formula may return a different result than expected in the following cases: •show_dk: If the show_dk_xxx parameter is set to no, the total of the rows after drill down might be different from the value from which drill-down was performed. •virtual input accounts: row drill down for accounts does not use selected data type, so it is possible to drill down "beyond" the input level. In this case, there is no value, and the subtotal formula will return 0. •non-data rows: the subtotal setting applies to the entire area. If the area contains non-data rows (formulas, headers etc), separate subtotal rows are created for these and are included in the grand total. • “Total” text in definition columns: the code uses the string "<space>Total" in the end of the string to identify the subtotal rows. If there is a string that matches this rule, this row will be treated as a subtotal row and not as a data row. Note! Predefined example settings are available for subtotals in Input and Report Template management by selecting the Add Example option instead of Insert. |
Path: <subtotals><subtotalsettings> Defines the settings for the subtotals function. Attributes group: Defines whether grouping (expand/collapse; +/-) is used for the data rows in the subtotal area. Possible values: •true (default) •false type: Defines the function type. Possible values: •sum (default) |
Path: <subtotals><subtotaldefcols> Includes the settings for the definition columns for which subtotalilng is applied. |
Path: <subtotals><subtotaldefcols><subtotaldefcol> Defines the definition columns for which subtotalling is applied. The order of the <subtotaldefcol> list determines the order of nesting, so that the highest level of subtotalling is shown first. In other words, the <subtotaldefcol> defined last will be grouped first, and the <subtotaldefcol> defined in the first position will be grouped last. Note! At least one <subtotaldefcol> must be added under <subtotaldefcols> in the XML definitions, otherwise the definitions are invalid. Attributes id: Defines the definition column ID. hide_group: Defines whether the definition column grouping is hidden. Note that drilling down to figures is possible also when grouping is hidden. Possible values: •true •false (default) |
Path: <subtotals><subtotaldatacols> Includes settings for the data columns to which the subtotal formulas are added. |
Path: <subtotals><subtotaldatacols><subtotaldatacol> Defines a data column to which a subtotal formula is added. If <subtotaldatacols> is defined, at least one <subtotaldatacol> must be added. Note! If the <subtotaldatacols> element is missing from the definitions, empty rows are still inserted and/or grouping is done, but no formula results are added. Attributes id: Defines the data column ID. |