View Full Version : Why with the same formula BUT some Grant Total match some not??!!


alexkong2003
09-12-2006, 09:12 PM
Hi all,

I have a Critical problem for my Grant Total field... hope someone can give a prefect solution.

I have a Grant total that use to show all those Sum of the sub total from my report. I use a combo box to control the display of my report, like 1 Reference No. could have several field of Company, Number of Employee, Sex by male or female and Expenses. i use Sum(IIf([Sex]="Male",1,0)) to count my male prefectly and the female as well In the Footer of the report of the Grant total field.

Now there is the problem when i count a Grant Total of the expenses in the Report Footer of the report! I use "Sum([TotalExpenses])" to do my Grant total BUT... The Amount is not correct!!, I wonder why the sum of the male or female is right but expenses not correct??!! (pls refer to Figure1), i do it with the same formula by Sum(IIf([Sex]="Male",1,0)) --> "Male", Sum([TotalExpenses])--> TotalExpenses.

Can somebody tell me why!!!?? Thank you!!

Regard,
alex

alexkong2003
09-14-2006, 04:31 AM
Hi everyone .... I had try so many ways, still can't solve my problem man!!! pls someone just give me a hand !! my head is going to explode!!! Ah~~~~!!

Thank you!

alexkong2003
09-14-2006, 05:50 PM
Hi,

Is me again, this time i do discover what is happening in my program already.... (pls refer to figure1 as my explaination). I do know why the Grant total is not match to the sum of the sub total, that is because they do it double or triple time in one subtotal, like i have a sub total of the male=3 and female=1, then the total is 4, and what the Grant total do is they sum the amount $2160 by 4 times by using the format of Sum([TotalExpenses])... so someone got any idea how to do it with just counting the sum just 1 time but not 4~~ Thanks alot!

alexkong2003
09-14-2006, 11:50 PM
Finally!!! I Made It !!!! Thank You God!!!!! I Do It By Myself!! Haha