Hello everyone,
I have some pretty weird rounding problem or I'm just not seeing something.
The situation is next. I have one table which keeps those amounts I need displayed on the report, and the field I'm fighting with is the tax one.
Every record has a value > 0 in the tax column, there's total of 1975 records. When I do a SUM with a query I get 78910.28. In the report query I use something like If Costumer doesn't Pays tax and is from area x show tax, otherwise put a 0.
I have 3 of that kind but different area:
(IIf([RegistrovanPDV] = False And [Entitet]='F',[IznosPDV],0)
(IIf([RegistrovanPDV] = False And [Entitet]='S',[IznosPDV],0)
(IIf([RegistrovanPDV] = False And [Entitet]='B',[IznosPDV],0)
I made sure that every customer has an area of those 3 offered, so that shouldn't be a problem.
And I have one more for when the customer pays tax IIf([RegistrovanPDV] = True, [IznosPDV], 0).
RegistrovanPDV has the value of either True or False, there's no Null, I checked.
Now all of that was probably not really necessary to describe but anyways.
When I SUM all those fields with a query I also get 78910.28, however on the report it shows 78909.13, that exact same query.
Now to the weird thing, when I change the query just from SELECT to SELECT TOP 2000 (it takes the same records because there are 1975 of total) I get the right amount, 78910.28.
EDIT: Found out that another important factor in the query for it to show the correct amount is the order, I added the same order which is present on the report design.
Not sure if I have described it well, if needed I can put more details.
Anyone had something like this?
Thanks!
I have some pretty weird rounding problem or I'm just not seeing something.
The situation is next. I have one table which keeps those amounts I need displayed on the report, and the field I'm fighting with is the tax one.
Every record has a value > 0 in the tax column, there's total of 1975 records. When I do a SUM with a query I get 78910.28. In the report query I use something like If Costumer doesn't Pays tax and is from area x show tax, otherwise put a 0.
I have 3 of that kind but different area:
(IIf([RegistrovanPDV] = False And [Entitet]='F',[IznosPDV],0)
(IIf([RegistrovanPDV] = False And [Entitet]='S',[IznosPDV],0)
(IIf([RegistrovanPDV] = False And [Entitet]='B',[IznosPDV],0)
I made sure that every customer has an area of those 3 offered, so that shouldn't be a problem.
And I have one more for when the customer pays tax IIf([RegistrovanPDV] = True, [IznosPDV], 0).
RegistrovanPDV has the value of either True or False, there's no Null, I checked.
Now all of that was probably not really necessary to describe but anyways.
When I SUM all those fields with a query I also get 78910.28, however on the report it shows 78909.13, that exact same query.
Now to the weird thing, when I change the query just from SELECT to SELECT TOP 2000 (it takes the same records because there are 1975 of total) I get the right amount, 78910.28.
EDIT: Found out that another important factor in the query for it to show the correct amount is the order, I added the same order which is present on the report design.
Not sure if I have described it well, if needed I can put more details.
Anyone had something like this?
Thanks!
Last edited: