Create the formula like f_Summ_Value and place the code like below and place the formula in GHeader
Sum ({command.column1},{command.column2})
column1 : Summary Field
column2 : Group Field
If not work, try below
WhileReadingRecords;
Sum ({command.column1},{command.column2})