My simple report :
-->Group Header
Cheque Number : 1, vendor : A, Extradisc: 1,000
--> Data
Item A Qty:1 Price: 50,000 Total:50,000
Item B Qty:1 Price: 50,000 Total:50,000
_________________________________________________
Subtotal:100,000
Extradisc: 1,000
Grandtotal: 99,000
Cheque Number : 2, vendor : B, Extradisc: 1,000
--> Data
Item D Qty:1 Price: 50,000 Total:50,000
_________________________________________________
Subtotal: 50,000
Extradisc: 1,000
Grandtotal: 49,000
For the summary i use :
Sum(Table.Subtotal) = 150,000 ... OK
Sum(Table.Grandtotal) = 148,000 .. OK
The problem is when i use Sum(Table.Extradisc) , the report gave me the value of 3,000 instead of 2,000
I see that when i use sum of extradisc on the first group (cheque number : 1), it calculated te extradisc twice because it has two detail)
How can i do some 'distinct' to that?
The rows return in sql
Cheque Number | Vendor | Extradisc | Product | Qty | Price | Total
1 | A | 1,000 | Item A | 1 | 50,000 | 50,000 --\ The report calculate the extradisc twice
1 | A | 1,000 | Item B | 1 | 50,000 | 50,000 --/ because it has two details, can i use
'distinct' thing?
2 | B | 1,000 | Item D | 1 | 50,000 | 50,000
Anyone can solve my problem?
sorry for my bad english