I have an Ms access Report with the following feilds

Demand Number , Major head, Net amount, category.etc

iIn the "category" field, each record hold the values of either 'A Revenue' or 'B capital'

I have sorted the records and groupedfirst in the 'Demand Number' then 'major head" and lastly in the 'Category' wise

I want the result in the Demand footer in the following manner

Sub total of Revenue ............... ie (only the sum of 'net amount'
of all record coming with 'A reveneu')

sub total of Capital ............ ie (only the sum of 'Net amout' of all record coming with 'B capital'

Grand total ie ., the total of all records in the 'Demand number' group
footer that i got using the formula '=sum([net amount])