dt是某个日期
希望表B完成填充的几行,其中有一列的数据为dt,例如:列D=dt
Dim g As New GroupTableBuilder("统计表1", DataTables("表A"))
g.Groups.AddDef("列A")
g.Totals.AddDef("列B", AggregateEnum.Count, "列C")
g.FromServer = True
g.Filter = "([time列1] > '"& dt &"' Or [time列1] Is null) And [time列2] <= '"& dt &"'"
g.Build()
'MainTable = Tables("统计表1")
Dim f As New Filler
f.SourceTable = DataTables("统计表1") '指定数据来源
f.SourceCols = "列A,列C" '指定数据来源列
f.DataTable = DataTables("表B") '指定数据接收表
f.DataCols = "列A,列C" '指定数据接收列
f.Fill() '填充数据
DataTables("表B").Save()