Dim bd1 As New GroupTableBuilder("统计表1",DataTables("行政案件"))
Dim dt1 As fxDataSource
bd1.Groups.AddDef("办案部门") '根据办案部门分组
dt1 = bd1.BuildDataSource()
Tables("统计_Table1").DataSource = dt1 '将统计结果绑定到Table
With DataTables("统计_Table1").DataCols '用表达式列计算库存数据
.Add("金额(元)_行政罚款",Gettype(Decimal))
.Add("金额(元)_款1",Gettype(Decimal))
.Add("金额(元)_合计",Gettype(Decimal))
.Add("查办案件(宗)_投诉",Gettype(Integer))
End With
For Each dr As Row In Tables("统计_Table1").Rows
dr("罚款金额(元)_行政罚款") = DataTables("行政案件").Compute("Sum(行政罚款)", "[办案部门] = '" & dr("办案部门") & "' And [结案日期]>=#" & e.form.controls("DateTimePicker1").Value & "# and [结案日期]<=#" & e.form.controls("DateTimePicker2").Value & "# ")
dr("罚款金额(元)_折1") = DataTables("行政案件").Compute("Count(款1)", "[办案部门] = '" & dr("办案部门") & "' And [结案日期]>=#" & e.form.controls("DateTimePicker1").Value & "# and [结案日期]<=#" & e.form.controls("DateTimePicker2").Value & "# ")
dr("罚款金额(元)_合计") = dr("罚款金额(元)_木材折款")+dr("罚款金额(元)_行政罚款")
dr("查办案件(宗)_投诉") = DataTables("行政案件").Compute("Count(办案部门)", "[办案部门] = '" & dr("办案部门") & "' And [来源]='投诉'And [结案日期]>=#" & e.form.controls("DateTimePicker1").Value & "# and [结案日期]<=#" & e.form.controls("DateTimePicker2").Value & "# ")
Next
在上面的代码中如何在"统计_Table1"表插入汇总行让"金额(元)_行政罚款"等全部列的垂直和,代码怎么写?