Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aggregate

Status
Not open for further replies.

georgeong

Programmer
Mar 28, 2002
2
PH
Hi,I have 2 clientdataset OrderMaster & OrderDertail

In the OrderDetail I created an persistent aggregate field name TOTAL with expression SUM(AMOUNT).

AMOUNT is an InternalCalc field (Qty * UnitPrice) of the OrderDetail dataset.

Problem : the TOTAL aggregate field is not producing the desired result. Could it be a bug of Delphi ? thanks George
 
Hi George,

The first step is to figure out what value the TOTAL field *is* returning. Then you'll know what Delphi is doing. Without seeing the values, my first guess would be that it's totaling all orders together, and not each individual order.

I'm thinking the TOTAL field should be created in the OrderMaster clientset, not the OrderDetail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top