AddTotal (add a total field to the last Level added)

Top  Previous  Next



(target, source, type, reset )


(target, source, type, reset, condition)


(target, reset )


(target, reset, condition )


Identify the break total type and optional source/target fields and condition.


The label of a field that the total result will be stored into.


The label of a field that the total result will be calculated from.


A byte that identifies the total type defined for the break. A count type = 1, average type = 2, sum type = 3.


A byte that specifies whether or not the target variable is reset on each break detected. A value of 1 specifies a reset, zero will not reset the target value.


A valid expression that will force a reset when evaluated to TRUE.


The AddTotal method is an overloaded method that caluculates three types of conditional or unconditional totaling.

Implementation: The AddTotal method is called after each break and level is added, directly following the AddResetField method. In the template interface, it is only active when totaling is added to the break.





 BreakMgr.AddLevel() !Count Break




 BreakMgr.AddLevel() !SumBreak




 BreakMgr.AddLevel() !ConditionalAverage


 BreakMgr.AddTotal(AverageValue,SourceToAverage,eBreakTotalAve,0,'PEO:Gender = ''M''')