Dim bd1 As New GroupTableBuilder("统计表1",DataTables("进货单"))
Dim dt1 As fxDataSource
bd1.Groups.AddDef("品名") '根据品名分组
bd1.Groups.AddDef("型号") '根据型号分组
bd1.Totals.AddDef("数量","进货_数量") '对数量进行统计
bd1.Totals.AddDef("金额","进货_金额") '对金额进行统计
dt1 = bd1.BuildDataSource()
在这个代码里面加如下一个时间条件,汇总金额和数量,怎么弄呢,谢谢
Dim Filter As String
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "日期 <= #" & .Value & "#"
End If
End With
[此贴子已经被作者于2019/6/21 7:35:59编辑过]