Subject | Re: [IBO] Calculated field column total? |
---|---|
Author | Jason Wharton |
Post date | 2002-02-27T23:04:37Z |
Yes, have two calculated fields. One for storage purposes and the other to
hold your real value.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
hold your real value.
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "Paul Hope" <paulhope@...>
Newsgroups: egroups.ibobjects
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, February 27, 2002 4:45 AM
Subject: [IBO] Calculated field column total?
> Hi
>
> I want to display a total of a calculated field for a read only dataset
> displayed in a grid. I could fire off another query on the server asking
it
> to recalculate a total every time a row changes in the displayed dataset -
> but this seems very inefficient.
>
> What I was hoping to do is in CalculateField
> subtract ARow.ByName('MyCalculatedField').asCurrency from my total
> calculate the new value of MyCalculatedField
> add the new value to my total
>
> Unfortunately reading the calculated field value before it is set doesn't
> work. It seems to return the value it had calculated for the previous
row.
>
> I have also tried summing the field values in the buffer (having set
> Fetchall to true) but I havn't found an appropriate event to attach this
> to - 'AfterRefresh' would be nice.
>
> Any Ideas?
>
> Regards
> Paul