Subject | Re: [IBO] Rounding problem |
---|---|
Author | rihoe |
Post date | 2005-04-20T18:19:15Z |
I use FB 1.03, Dialect 1.
-----------------
Data is stored in this table:
CREATE TABLE TRUST_BALANCE (
ACCID INTEGER NOT NULL,
SDATE DATE NOT NULL,
MACCOUNT VARCHAR(35) NOT NULL,
CURRENCY VARCHAR(3) NOT NULL,
NAME VARCHAR(200),
AVERAGE NUMERIC(15,2),
CONSTRAINT TRUST_BALANCE_PK PRIMARY KEY
(ACCID,SDATE,MACCOUNT,CURRENCY)
);
-----------------
Field is populated with this row:
DModul->QTrBalance->FieldByName("AVERAGE")->AsString=packet->Find
("BAL",Ansi);
------------------
Query properties:
object Query: TIB_Query
ColumnAttributes.Strings = (
'SDATE=NOTIME')
FieldsDisplayFormat.Strings = (
'MIN=0.00'
'AVG=0.00')
SQL.Strings = (
'SELECT ACCID'
' , account.ACCOUNT'
' , TRUST_BALANCE.CURRENCY'
' , MACCOUNT'
' , NAME'
' , avg(AVERAGE),min(average)'
'FROM TRUST_BALANCE'
'JOIN ACCOUNT on TRUST_BALANCE.accid=account.ID'
'group by accid, account.ACCOUNT'
' , TRUST_BALANCE.CURRENCY'
' , MACCOUNT , NAME')
OrderingItemNo = 1
OrderingItems.Strings = (
'Currency=trust_balance.CURRENCY,maccount;trust_balance.CURRE
NCY ' +
'DESC,maccount'
'Member'#39's
account=MACCOUNT,trust_balance.CURRENCY;MACCOUNT DESC,t' +
'rust_balance.CURRENCY')
OrderingLinks.Strings = (
'CURRENCY=ITEM=1'
'MACCOUNT=ITEM=2')
--------------
In QReport I use TQRDBText:
object QRDBText2: TQRDBText
Left = 212
Top = 0
Width = 24
Height = 16
DataField = 'AVG'
Mask = '0.00'
end
--
Riho-Rene Ellermaa
Ellermaa Tarkvaratöökoda
-----------------
Data is stored in this table:
CREATE TABLE TRUST_BALANCE (
ACCID INTEGER NOT NULL,
SDATE DATE NOT NULL,
MACCOUNT VARCHAR(35) NOT NULL,
CURRENCY VARCHAR(3) NOT NULL,
NAME VARCHAR(200),
AVERAGE NUMERIC(15,2),
CONSTRAINT TRUST_BALANCE_PK PRIMARY KEY
(ACCID,SDATE,MACCOUNT,CURRENCY)
);
-----------------
Field is populated with this row:
DModul->QTrBalance->FieldByName("AVERAGE")->AsString=packet->Find
("BAL",Ansi);
------------------
Query properties:
object Query: TIB_Query
ColumnAttributes.Strings = (
'SDATE=NOTIME')
FieldsDisplayFormat.Strings = (
'MIN=0.00'
'AVG=0.00')
SQL.Strings = (
'SELECT ACCID'
' , account.ACCOUNT'
' , TRUST_BALANCE.CURRENCY'
' , MACCOUNT'
' , NAME'
' , avg(AVERAGE),min(average)'
'FROM TRUST_BALANCE'
'JOIN ACCOUNT on TRUST_BALANCE.accid=account.ID'
'group by accid, account.ACCOUNT'
' , TRUST_BALANCE.CURRENCY'
' , MACCOUNT , NAME')
OrderingItemNo = 1
OrderingItems.Strings = (
'Currency=trust_balance.CURRENCY,maccount;trust_balance.CURRE
NCY ' +
'DESC,maccount'
'Member'#39's
account=MACCOUNT,trust_balance.CURRENCY;MACCOUNT DESC,t' +
'rust_balance.CURRENCY')
OrderingLinks.Strings = (
'CURRENCY=ITEM=1'
'MACCOUNT=ITEM=2')
--------------
In QReport I use TQRDBText:
object QRDBText2: TQRDBText
Left = 212
Top = 0
Width = 24
Height = 16
DataField = 'AVG'
Mask = '0.00'
end
--
Riho-Rene Ellermaa
Ellermaa Tarkvaratöökoda