DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: cuiqingbo
今日帖子: 25
在线用户: 7
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 chinarjin (水手) ★☆☆☆☆ -
盒子活跃会员
2018/6/19 23:17:40
标题:
DBGridEh1.Columns变量问题 浏览:1025
加入我的收藏
楼主: DBGridEh1.Columns[7].Footer.ValueType := fvtSum;
以上能否固定变量,如果DBGridEh1.Columns[7]第7列是‘数量’,能否 数量.Footer.ValueType := fvtSum;
DBGridEh1中要怎么实现?
----------------------------------------------
因为爱所以爱,Delphi 
http://www.qzpcn.com
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2018/6/20 1:31:37
1楼: 您可以在数据库中使用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
作者:
男 ghs_79 (ghs) ★☆☆☆☆ -
盒子活跃会员
2018/6/20 8:17:59
2楼: DBGridEh1.FindFieldColumn('FieldName').Footer.ValueType := fvtSum
用字段名就行了,不要用索引,这样列的顺序可以随便调整
----------------------------------------------
Delphi爱好者。
作者:
男 chinarjin (水手) ★☆☆☆☆ -
盒子活跃会员
2018/6/20 14:57:47
3楼: 2楼好像不行
----------------------------------------------
因为爱所以爱,Delphi 
http://www.qzpcn.com
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行62.5毫秒 RSS