Put a calculated value at the footer of a grouping

I create a global variable and in OnRecord I calculate a certain value, all good.

The question is how I put that value at the end of each groups.
The field is type time, so it is not calculated with the automatic functions.

Thank you in advance.

Create a totalization in the group, calculate onrecord what you want and in the event ongroupbyall, using {sum_quebra_‘file_name’} = $your_value