Board index » delphi » Bill Todd - OnCalc Question

Bill Todd - OnCalc Question

Bill

In some of your postings, you mention using a calculated field and a
second table to get the total of a field in detail records.  Is it
possible to use a variation of this method, if the Detail table has
cachedupdates = true and a detail record is modified but not posted? Or
isn't it possible to make the second table see the modifications to the
detail record, without posting the record and applying the updates
first?

Thanks for any help
Rick

 

Re:Bill Todd - OnCalc Question


This is exactly the solution I am looking for!!
Bill, plaese answer!

Arne.

Re:Bill Todd - OnCalc Question


Quote
>In some of your postings, you mention using a calculated field and a
>second table to get the total of a field in detail records.  Is it
>possible to use a variation of this method, if the Detail table has
>cachedupdates = true and a detail record is modified but not posted? Or
>isn't it possible to make the second table see the modifications to the
>detail record, without posting the record and applying the updates
>first?

Not possible with cached updates.  The records are not visible to another table
until updates are applied.

If you have the Clientserver version of Delphi switch to using TClientDataSet
with supports aggregate fields.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Bill Todd - OnCalc Question


I use a data field in the master table, say TotalAmount, to store the sum of
a number field in the detail table, say ItemAmount.

On the OnChange event of the ItemAmount I loop through all the ItemAmount
values aggregating them using while not EOF.

Also, have a look at the MastApp demo.

Edgar D. Jordan

Quote
Rick Hollerich wrote in message <37B239C0.3...@prairie.lakes.com>...
>Bill

>In some of your postings, you mention using a calculated field and a
>second table to get the total of a field in detail records.  Is it
>possible to use a variation of this method, if the Detail table has
>cachedupdates = true and a detail record is modified but not posted? Or
>isn't it possible to make the second table see the modifications to the
>detail record, without posting the record and applying the updates
>first?

>Thanks for any help
>Rick

Other Threads