There are three groups: salesman, district and customer. I put the formula group 3 (customer) for 12 columns representing months.
When I decided to show the details I copied the formula from the group 3 and pasted it below in the details. That's when I discovered that some of the values were being ignored. The value is how much is spent minus taxes during a certain month. The footer shows the correct subtotal even when the group shows 0.
The formula is as follows:
If NumericText({Header_.Del_Date}) then
If (ToNumber(mid({?Date Range}, 5, 2)) + 1) < 13 and
(ToNumber(mid({?Date Range}, 5, 2)) + 1) = (ToNumber(mid({Header_.Del_Date}, 5, 2)))
then {Header_.Grand_Inv_Total} - ({Header_.CC_Tax}+{Header_.MiscTax})
else
if (ToNumber(mid({?Date Range}, 5, 2)) - 12) = (ToNumber(mid({Header_.Del_Date}, 5, 2)))
and
(ToNumber(mid({?Date Range}, 1, 4)) + 1) = ToNumber(mid({Header_.Del_Date}, 1, 4))
then {Header_.Grand_Inv_Total} - ({Header_.CC_Tax}+{Header_.MiscTax})