Variables-Totalling(groupby)Totalling Variables (group by)

During the group by processing, Scriptcase generates total variables to each group level. The routines are defined in event “onGroupBy” determining the group levels. Totals special variables are then referenced substituting the group name for the key word “quebra”, as in:

Variable
Description
{count_ger} Records total amount.
{sum_parcel} Field “parcels” total.
{sum_balance} Field “Balance” total.
{count_quebra} Current group level records total.
{sum_quebra_parcel} Current group level field “parcels” total.
{sum_quebra_balance} Current group level field “Balance” total.



Ex. 1: In an application with a group by state and city and that totalizes a balance field, in the group totals, is possible to display the average (avg) instead of the balance as follows.

{sum_quebra_balance} = {sum_quebra_balance} / {count_quebra};