This event is executed whenever breaks occur, regardless of the break level, and allows the manipulation of the totalization fields.
Scriptcase makes all the totalization variables available in the scope of the Grid.
onGroupBy is only executed when the Query application has one or more Breaks configured.
Eg:
Assuming an application that has two levels of state and city break and that totals two parcel and balance fields, we can have access to the totals, in the scope of "calculating each record", as follows:
{count_ger} - contains the total amount of the registers;{sum_parcel} - contains the general summing of the "parcel" field;{sum_balance} - contains the general summing of the "balance" field;{count_state} - contains the total amount of the registers, of "state" grouping that is being processed;{sum_state_parcel} - contains the summing of the "parcel" field, of the "state" grouping that is being processed;{sum_state_balance} - contains the summing of the "balance" field, of the "state" grouping that is being processed;{count_city} - contains the total amount of the registers, of the "city" grouping that is being processed;{sum_city_parcel} - contains the summing of the "parcel" field, of the "city" grouping that is being processed;{sum_city_balance} - contains the summing of the "balance" field, of the "city" grouping that is being processed;Considering that the formulas, defined to be processed in the scope of "calculate during the groupings" will be acting for the various grouping levels, the special sum variables, in this scope, are referenced substituting the grouping name by the word key "grouping", or either:
{count_ger} - contains the total amount of the registers;{sum_parcel} - contains the general summing of the "parcel" field;{sum_balance} - contains the general summing of the "balance" field;{count_groupby} - contains the total amount of the registers, of the grouping that is being processed;{sum_groupby_parcel} - contains the summing of the "parcel" field, of the grouping is being processed;{sum_groupby_balance} - contains the summing of the "balance" field, of the grouping is being processed;