Grouped Columns

The possibility to visualize a grid with the records grouped by certain column was added. This can be defined at design time (within the instance), or enable which columns can be used to group, and then at runtime select the ones that end user want to group. Each group of records will display its subtotals, when the grid has totalizers.

SampleGroupedColumns

In order to group the records of a grid by certain column you have two options and this is defined on the property 'Group Type' within the Grid Node.

Grid Node -> 'Group Type' property with 'Fixed' value

It will group the records of the grid by that column, and end user won´t be able to change it.

You need to specify the column that you want to group, in the property 'Fixed group field' of Grid node.

Grid Node -> 'Group Type' property with 'Multiple options' value

End user will be able to change the grouped column at runtime, among the columns that are available for grouping (defined in the WorkWithPlus instance).

When selecting this option, you have to set the property 'Allow Grouping' as true to the attributes within the grid that you want to be able to group at runtime. Then, in the Grid node, you will have to set a value for the property 'Default group column', that will be the column to be used for grouping the records, when the grid loads the first time.

In both scenarios of grouping, you will need to set the 'Group caption' property, that will define the caption to be displayed in the group row. The value <default> will take its value from WorkWithPlus Settings -> Labels -> 'Group Caption'.

In WorkWithPlus Settings -> Labels node -> 'Group Caption' property, you can mention the tags <ATT_DESCRIPTION>, <ATT_VALUE_DSC> and <GROUP_COUNT>.

Example 1:

  • Group column: Status
  • Value of 'Group caption': format('%1: %2', <ATT_DESCRIPTION>, <ATT_VALUE_DSC>)
  • At runtime each group row will display:
    • Status: Started
    • Status: Finished
    • Status: Canceled

Example 2

  • Group column: Status
  • Value of 'Group caption': format('%1: %2 (%3)', <ATT_DESCRIPTION>, <ATT_VALUE_DSC>,'<GROUP_COUNT>')
  • At runtime each group row will display:
    • Status: Started (74)
    • Status: Finished (52)
    • Status: Canceled (59)

The property 'Calculate Group Totalizers'  which is in WorkWithPlus Settings -> Objects Node, defines the name of the procedure where the calculation of each group row totalizer will be done.