this new formuals is taking only the main report count not adding the subreport count.
means the output is like
Dept1 30
Dept2 20
Dept3 50
Dept4 30
and the old formula i.e(with out having else condition) is showing like:addition working properly but the dept4 is showing 0
actually my subreport groups may change dynamicall sometimes i will get 3 grous and some times i may get same group as main report
Thank you,
Prasad