Variables-TotallingTotalling Variables

During group by and summary processing, Scriptcase generates total variables to each group level.

The routines are defined in event “onGroupBy” determining the break levels and avalilable to each record. Totals special variables are then referenced substituting the group name for the key word “groupby”, as in:

 

Variables
Description
{count_ger} Records total amount.
{sum_parcel} Will show the total sum for the field "Parcel"
{sum_balance} Will show the total sum for the field "Balance"
{count_groupby} Current Group records total.
{sum_groupby_parcel} Current Group level sum for the field “Parcel”.
{sum_groupby_balance} Current Group level sum for the field “Balance”.

 

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

{sum_groupby_balance} = {sum_groupby_balance} / {count_groupby};