您可以在数据库中使用SQL计算,在数据集中计算字段,或在使用像SUM,AVG等Agregate函数时在Footer / Header中激活属性... ---------- You can use SQL calculate in your Database, Calculate Field in your Dataset, or activate property in Footer/Header when using Agregate Functions like SUM, AVG, etc...
Q: In a DBGridEh group, there is a way to show the group functions (sum, avg) in the header of the group? A:Well, I found it: Property DataGrouping.GroupRowDefValue.FooterInGroupRow = True in the DBGridEh
Q: Sum using CalculateFields http://forum.ehlib.com/en/viewtopic.php?f=5&t=500&p=1066&hilit=sum+function#p1066
FORUM EhLib http://forum.ehlib.com/en/viewforum.php?f=5
You can verify, before, in field event, is the value is not ZERO. For example. You can verify, before, if the Dataset is created or enable, before any action... like in http://forum.ehlib.com/en/viewtopic.php?f=5&t=774&p=1840&hilit=sum#p1840 ------- 您可以在现场事件之前验证该值是否为零。 例如。 在执行任何操作之前,您可以验证数据集是否已创建或启用 http://forum.ehlib.com/en/viewtopic.php?f=5&t=774&p=1840&hilit=sum#p1840
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3