When displaying an output form, you may want to display in the header a variable that accumulates the value for one specific field. You can do so by placing the following code in the object method for the variable which accumulates the value:
: (Form event=On Header )
`MyVar2 is the variable displayed in the header
Please note that the Sum command uses indices when available. Therefore, indexing the field that is accumulated will greatly enhance the speed.