Dim g As New CrossTableBuilder("统计表45", DataTables("明细表"))
g.HGroups.AddDef("供应商名称", "", "供应商名称")
g.VGroups.AddDef("日期", DateGroupEnum.Year, "{0}年")
g.VGroups.AddDef("日期", "{0}月")
g.Totals.AddDef("车次", "车次")
g.Totals.AddDef("数量", "数量")
g.Totals.AddDef("应付金额", "应付金额")
g.HorizontalTotal = True
g.VerticalTotal = True
g.Subtotal = True
g.Build()
Tables("报表_Table7").DataSource = g.BuildDataSource()
For Each c As Col In Tables("报表_Table7").cols
If c.IsNumeric Then
c.DataCol.SetFormat("#,###.00")
End If
Next