Subject | Rounding problem |
---|---|
Author | rihoe |
Post date | 2005-04-16T16:31:54Z |
IBO 4.2.Hc, BCB5
My query contains AVG(AMOUNT) field, where AMOUNT NUMERIC(15,2).
I show the results in Grid and QReport.
QReport uses TIBOQuery, which I initialize with original query:
IBOFStatement->AssignSQLWithSearch(DSource->Dataset);
In my TIB_Grid some AVG values are 1 cent smaller (1.63 instead of
1.64) than results seen in QReport. Also when I run my query in
IBAdmin application, the AVG values are similar to QReport values.
Looks like there is some rounding problem in TIB_Grid.
Everything is with default settings, only TIB_Query has
FieldsDisplayFormat.Strings = 'AVG=0.00', but changing that doesn't
change anything.
Riho
My query contains AVG(AMOUNT) field, where AMOUNT NUMERIC(15,2).
I show the results in Grid and QReport.
QReport uses TIBOQuery, which I initialize with original query:
IBOFStatement->AssignSQLWithSearch(DSource->Dataset);
In my TIB_Grid some AVG values are 1 cent smaller (1.63 instead of
1.64) than results seen in QReport. Also when I run my query in
IBAdmin application, the AVG values are similar to QReport values.
Looks like there is some rounding problem in TIB_Grid.
Everything is with default settings, only TIB_Query has
FieldsDisplayFormat.Strings = 'AVG=0.00', but changing that doesn't
change anything.
Riho