Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共7 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:表达式

1楼
sophia 发表于:2010/7/5 11:08:00

我想对表A中当前行以上(不包括当前行)所有行的某列求和, 表达式该怎么写?

 

2楼
狐狸爸爸 发表于:2010/7/5 11:21:00
看看Table的Aggregate方法
3楼
sophia 发表于:2010/7/5 12:14:00

我想统计受理表中第一行至倒数第二行的"大型数量"这么写不对吗?报错没找到原因

Dim Sum As integer
Dim t As table = tables("受理表")
Sum = t.Aggregate(AggregateEnum.Sum, t.Rows(0), t.cols("大型数量"), t.Rows(t.Rows.Count - 2), t.cols("大型数量"))
OutPut.Show(Sum)

4楼
sophia 发表于:2010/7/5 14:42:00
以下是引用sophia在2010-7-5 12:14:00的发言:

我想统计受理表中第一行至倒数第二行的"大型数量"这么写不对吗?报错没找到原因

Dim Sum As integer
Dim t As table = tables("受理表")
Sum = t.Aggregate(AggregateEnum.Sum, t.Rows(0), t.cols("大型数量"), t.Rows(t.Rows.Count - 2), t.cols("大型数量"))
OutPut.Show(Sum)

这个Sum结果不应该是integer型吗?怎么提示是Row呢?
图片点击可在新窗口打开查看此主题相关图片如下:未命名1.bmp
图片点击可在新窗口打开查看
5楼
狐狸爸爸 发表于:2010/7/5 14:48:00

Dim Sum As integer
Dim t As table = tables("受理表")
Dim p AS Index = t.Cols("大型数量").Index
Sum = t.Aggregate(AggregateEnum.Sum,  0,  p,  t.RowSel -1,  p)
OutPut.Show(Sum)

6楼
czy 发表于:2010/7/5 14:53:00
Dim Sum As Double
With Currenttable
    Sum = .Aggregate(AggregateEnum.Sum,0,.Cols("数量").Index,.Position -1,.Cols("数量").Index)
End With
OutPut.Show(Sum)
7楼
sophia 发表于:2010/7/5 15:06:00

没有狐爸的帮助,我真是无法前进了!图片点击可在新窗口打开查看

共7 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01563 s, 2 queries.