Foxtable(狐表)用户栏目专家坐堂 → 如何只自动统计最后10行的数据?


  共有9989人关注过本帖树形打印复制链接

主题:如何只自动统计最后10行的数据?

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251060 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2011/12/14 10:22:00 [显示全部帖子]

统计订单表最后10行:

 

Dim dt As DataTable = DataTables("订单")
Dim idx As Integer = math.max(0,dt.DataRows.count - 10)
Dim g As New GroupTableBuilder("统计表1", dt)
g.Filter = "[_Identify] >= " & dt.DataRows(idx)("_identify")
g.Groups.AddDef("日期", "月")
g.Totals.AddDef("数量")
g.Build()
MainTable = Tables("统计表1")


 回到顶部