I have prepared a report which shows the payments. The payments are grouped first on the departments and then managers and lastly the project names. There is a short demonstration below.
Herein, I have written custom code functions for calculating Total and Department Totals. They work. Because they are in the groups. HoweverSUM is not in a group. That means SUM is just in the end of report. It must sum all thedepartment totals. As you can see above it must be 4350. Also, I have written a custom code function to calculate the sum of allDepartment Totals. But, it just calculates the last group's Department Total. It means, my custom code for SUM shows me650. My custom code is below. Please have a look. I am trying to solve this since this morning..
Public Function CalcMedTotal5(ThisValueeeee as Integer) as Integer GroupMedTotal5 = GroupMedTotal5 + ThisValueeeee GrandMedTotal5 = GrandMedTotal5 +ThisValueeeee End Function Public Function ReturnMedSubtotal5() as Integer Dim ThisValueeeee as Integer = GrandMedTotal5 Return ThisValueeeee End Function
Thanks in advance...
KAdir