Grouping Data
The DsGroup element discussed here is available in Logi Info v12.5 but has been deprecated in later Info versions; consult the Release Notes for specific details.
Here's an example of the DsGroup element in action:
As shown above, a DsGroup element is added as a child of the DataLayer.Data Services element. Its Group Column attribute is set to the name of a column in the data. The data will be grouped based on the values in this column.
The results are shown above. The rows are grouped by CategoryID and one row for each category is included.
When grouping is applied, only values from the column named in the Group Column attribute are returned to the datalayer.
Grouping on Multiple Columns
Grouping can be accomplished on more than one column in the datalayer at the same time. This example shows the effects of grouping multiple columns:
As shown above, to group on multiple columns, enter their names in the Group Column attribute in a comma-separated list. The data will be grouped based on the values in these columns, in the order of the column names in the list.
The results are shown above. The rows are grouped first by LastName and then by CustomerID.
When grouping is applied, only values from the columns named in the Group Column attribute are returned to the datalayer.
Conditional Grouping
The DsGroup element can be employed dynamically using its Include Condition attribute.
If the value of this attribute is left blank or contains an expression that evaluates to True, the element is applied to the data. If the value evaluates to False, the element is ignored and does not affect the data. This allows you to dynamically determine if the data will be grouped or not.