I have a report that subtotals each project's contract amounts and invoiced amounts using DB calc. I need to divide the total for invoices amounts by the total for contract amounts at the project level. According to the help menu, I cannot use the db calc amounts to do this. I need a variable for the sum of the contract amounts and one for the invoice amounts. I am sure there is an easy way to create these variables but I can't get there.
I have tried sum(contract) and it gives me an error msg. I tried (contract) and it only gives me the last row's amount. I would appreciate any help you can give me.

