{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}

Grouping

Grouping means that elements aggregated by a certain criterion are bundled together. These bundles appear in a certain sort order. A group consists of

  • the group criterion (a "group field"),
  • the fields that belong to the group,
  • an optional field ("group name field") describing the group and additional flags (e.g., "keep group together") which describe the way how the group instances are placed and displayed,
  • the sort order of the group instances and an optional back-link to a field which describes the parent node of the group ( hierarchical grouping),
  • three sections, a group header, a group footer and the detail section. All groups share the same detail section.

Each group can be examined in detail; you can "Drill Down" to a certain group instance and you will only see the data which makes up the group instance.

Associated with the group are:

  • a section flag specifying that this section is or is not visible on drill down,
  • a section flag specifying that this section is or is not visible in the main (non-drill down) report,
  • a group tree which shows an outline of all group instances available in the report.
  • a group selection formula

Overview

A group criterion is a group field which collects certain rows into a group. For example all rows which have the same "customer ID" can be grouped together. And in turn these groups can be grouped together by using another criterion. The group field can be any field for example a database field or a formula field.

A group name field can be used to give the group a name. The default is the group field (i.e. the group criterion, "customer ID" in the above example), but it can be any other database or formula field. The group name field will also be displayed in the group tree showing the outline of the groups available. With the function GroupName({table.field}) the group name can be used in formula fields.

Additional flags describe the layout of the group. The group can be kept together and the group header section can be repeated on each page.

Inserting a group also lets you sort the group fields. The sort order can be "ascending", "descending", "original", specified, By Summary or hierarchical grouping.  See the next section for a complete discussion of sorting orders.

The group tree shows an outline of all group instances by displaying the value of the group name field in a tree. Clicking on a tree node will show the appropriate sections in the document. If the section flags of the group header and group footer are both set to invisible in the main report, it will automatically drill down into the group instance. Using the right mouse button it is always possible to drill down into a group instance, even if the instance does not contain any data.

The following sections will describe the group properties, the way hierarchical grouping is handled and drill down in detail.

The group selection formula is a special formula which should be used after the data has been grouped and sorted. In contrast to the record selection formula which is faster and can be executed on the database server itself, the group selection formula can remove rows based on the grouping that has been done. Applying this formula implies several in-memory copy operations and is quite expensive, so it should not be viewed as additional record selection formula.

Group Properties

To start the group properties dialog, click on insert -> group or on the report -> change group menu.

The group properties are:

  • group field,
  • group name field,
  • keep group together
  • repeat group header on each page
  • parent field and indent (optional for hierarchical grouping)

The only required field is the group field. If the group name field is empty, the group field will be used to display the group name.

See the group properties dialog for details.

Sorting

For each group a sorting can be specified. The sort direction can be upwards and downwards and, for special purposes a back-link field can be specified for hierarchical grouping.

See the sort dialog for details.

Drill Down

Drill down is a way to focus on the specific group instance by discarding all records which are outside of the selected group boundaries. The group tree can be used to drill down into a group instance or to select a group instance in the main report.

The group-tree draws an outline of the report's group structure showing the group instance's group name field in the nodes. Clicking on the node in the tree with the left mouse button will invoke an action. When the group instance's group header and group footer are invisible, the node will appear with a magnifying glass indicating that clicking on this node will drill down into the group instance. If not, then clicking on the node will select the appropriate group in the document by placing a red mark on the left side.

In PDF export the group tree is also available. Selecting a node will show the page which has the selected group instance.

In order to drill down into a group instance right-click on a node and select "drill down". A new tab will appear in the viewer with the name of the group (the value is taken from the group name field). The content of the tab is the partial group tree and the data for the drill-down group only. It is possible to drill down from every tab, and it is possible to drill down from every node in the group tree more than once. The page numbers in the drill down tab start from 1, embedded objects like chart and crosstab see only the limited data, even if they are placed in the page header or page footer.

You can suppress individual sections in the drill-down tab by using the section flag "visible on drill down". In the drill-down tab, only the sections with the flag set to "visible on drill down" are visible. In the main report only the sections which don't have the flag "invisible" set are visible. For compatibility with Crystal Reports (TM), we set the "visible on drill down" flag only when suppress is off.

Every on-demand sub-report may have its own drill-down tree. It is possible to print and export every drill down tab as if it were a on-demand sub-report. However, rendering an on-demand sub-report will consume less resources than a drill-down tab, so if performance is an issue, then on-demand sub-reports should be preferred.

It is possible to switch off the group tree in the java viewer either by calling viewer.setHasGroupTree(false) or by changing the appropriate applet parameter. The default value for the applet parameter is true, which means that drill-down is available. If run outside of i-net Designer as a standalone or Servlet version the URL property hasGroupTree=false can be appended to the end of the request URL to switch off the group tree.

It is also possible to switch off the group tree globally by setting the i-net Clear Reports property "Has Group Tree" to false using the Configuration Manager. If this is the case then the drill down tree will never be rendered by i-net Clear Reports and it will arrange to set the applet parameter for the java client so that the client will not request the group tree. If a client requests the group tree while the group tree is switched off on the server-side, the server will respond by sending the name of the current report file only.