Dim flb As WinForm.RadioButton = e.Form.Controls("flRadioButton")
Dim fltab As WinForm.TabControl = e.Form.Controls("flymTabContro")
Dim aszlx As WinForm.RadioButton = e.Form.Controls("asjdcxRadioButton")
Dim g As New GroupTableBuilder("统计表1", DataTables("收支交易流水"))
If aszlx.Checked=True Then
g.Groups.AddDef("所属账户","账户名称")
g.Totals.AddDef("单号", AggregateEnum.Count,"笔数")
g.Totals.AddDef("收入金额","金额")
g.Totals.AddDef("收入金额", AggregateEnum.Average, "每笔平均金额")
g.Filter = "[交易类型] ='收入'"
g.Build()
MainTable = Tables("统计表1")
Tables("收入明细窗体_srTable").DataSource = DataTables("统计表1")
Tables("收入明细窗体_srTable").SetColVisibleWidth("账户名称|200|笔数|160|金额|300|每笔平均金额|300")
For Each c As Col In Tables("收入明细窗体_srTable").Cols
c.TextAlign = TextAlignEnum.Center
Next
End If
这样是统计整个表的数据,这样统计某 一时间段内的数据呀?假如只统计本年内的数据怎么写呢?
[此贴子已经被作者于2020/2/25 17:51:16编辑过]