Compute grand total before saving?

over all grand total, meaning sum of all Grand Totals?

In that case, you can make a custom field to have the overall grand total. Then you can write a trigger on the child table that update the custom field with the total. The logic in the custom script here can help:

Trigger on the child table means that the custom field will be updated whenever there is a change in the rows on child table, even before saving.