Foxtable(狐表)用户栏目专家坐堂 → 数据统计


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

主题:数据统计

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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2012/3/9 12:06:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        Filter = Filter & "日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("DateTimePicker2")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "日期 <= #" & .Value & "#"
    End If
End With
Dim g As New GroupTableBuilder("统计表1", DataTables("订单加工"))
g.Groups.AddDef("品种")
g.Totals.AddDef("加工数", AggregateEnum.Count)
g.Filter = Filter
g.Build()
MainTable = Tables("统计表1")

 回到顶部