You can open the Report Navigator window of the Report Builder by choosing .
The Report Navigator reveals the structure of the report. You can use the Report Navigator to insert functions into the report.
Click an entry in the Report Navigator. The corresponding object or area is selected in the Report Builder view. Right-click an entry to open the context menu.
In the context menu of the Report Navigator, you will see the same commands as in the Report Builder view, plus additional commands to create new functions or to delete them.
Functions can be entered using a syntax as specified by the OpenFormula proposal.
See Wiki page about Base for some more help regarding the functions in a report.
Open the Report Navigator.
Open the Groups entry and the group where you want to calculate the cost.
The group has a sub entry called functions.
Open the context menu (right-click) on the functions entry, choose to create a new function, and select it.
In the property browser you see the function.
Change the name to e.g. CostCalc and the formula to [CostCalc] + [enter your cost column name].
In the initial value enter 0.
Now you can insert a text field and bind it to your [CostCalc] (appears in the data field list box).
Maybe you have to set the initial value to the value of the field like [field].
If there are blank fields in the cost column, use the following formula to replace the blank fields' content with zero:
[SumCost] + IF(ISBLANK([field]);0;[field])