SUBTOTAL_GROUPn
Feature available from Bizview version - Bizview 6.0
= optional in Column A
Parameter | Mandatory/Optional | Occurrence in column A | Comment | |
---|---|---|---|---|
FORMS | REPORT | |||
SUBTOTAL_GROUPn | up to 7 times | If subtotals should be created in several levels then this parameter need to be defined for each subtotal group defined in the SUBTOTAL row (i.e SUBTOTAL_GROUP1, SUBTOTAL_GROUP2 and so on). SUBTOTAL_GROUP rows should define the formatting of the subtotal row for the particular group level and the subtotal heading, placement and reference. |
SUBTOTAL_GROUPn in column A is a parameter that should be used if several levels of subtotals should automatically be inserted in the document. This parameter must be defined in combination with the SUBTOTAL parameter.
If wanting to create a subtotal document with several levels, then the following should be stated in column A in the template:
- SUBTOTAL - this row specifies which columns that should be grouped together in each subtotal. Bizview supports up to 7 levels. The columns that should be grouped must be stated with GROUP1, GROUP2 and so on. In addition this row also states the columns that should be summarized in the subtotal row, these columns should be defined with SUM.
- SUBTOTAL_GROUPn - one parameter row for each subtotal group should be added in column A. Each SUBTOTAL_GROUPn row should define the formatting of the subtotal row, the viewtag, as well as the placement, format and reference of the subtotal heading.
Note: When building a subtotal document in several levels it is also recommended to set the SUBTOTAL parameter value - Group detail rows in an outline - to TRUE in the Parameters tab (PARAM). By doing that, then group +/- symbols will be added for each subtotal level, as shown below.
The following must be defined in the SUBTOTAL_GROUP row:
- In column B (ROWTYPE) - define which VIEWTAG the subtotal rows should have. After the document is created, this cell will be set to DESIGN and thereby the parameter row SUBTOTAL_GROUPn will be hidden in the generated document.
- Define in which column the subtotal heading should be viewed and how it should be formatted and referenced.
- Govern the actual formatting of each subtotal row.
Template worksheet:
- In the SUBTOTAL row the columns that should be grouped are stated. In this example, three levels of subtotals are created (GROUP1, GROUP2, and GROUP3) and the detail rows will then show ITEMs. In addition, columns that should be subtotaled begin with "SUM".
First subtotal group is CUSTGROUP:
- In the SUBTOTAL row GROUP1 is added in the CUSTGROUP column (column E).
- The row SUBTOTAL_GROUP1 then defines how this row should be formatted (gray background, and white font).
- The row SUBTOTAL_GROUP1 also defined which VIEWTAG this subtotal level should have. In this example, SUM1 (stated in column B). The VIEWTAG then affects which of the subtotal levels should be visible initially when generating the document. In this template, the VIEWTAG SUM1 is defined as TRUE in PARAM, meaning that it is the first subtotal level that will be visible initially.
- In addition, the SUBTOTAL_GROUP1 row also defines in which cell the subtotal heading should be. In this example, the text will be stated in column E and begin with "Total for custgroup:". After the text a reference to the columns from which the customer ID and description should be fetched for each subtotal row. In this example, the custgroup ID will be fetched from column E (stated as $COL_E) and the description from column F (stated as $COL_F). These $-parameters will then be exchanged with the correct text when adding the subtotal rows.
Thereafter, the same should be defined for GROUP2 (ITEMCLASS) and GROUP3 (ITEMGRP)
After defining the template like above, the generated document will have the following look:
Note: The subtotal group that should be visible initially when generating the document depends on the VIEWTAGs defined in the template.
If expanding groups down to the detail rows for items it looks like the following:
If only ITEM should be visible in the detail rows then it is possible to set DESIGN in all other group columns (in addition the subtotal headings then are moved to the visible columns):
When generating the above template, the report will have the following look when expanding the subtotals down to detail rows: