甜版我做了以下的代码,测试出现以下错误,您帮看下
Dim bcty As WinForm.ComBoBox = e.Form.Controls("ComboBox12")
Dim g1 As New GroupTableBuilder("统计表1", DataTables("明细根表"))
Dim dt1 As fxDataSource
g1.Groups.AddDef("运输审核_结算月", "结算月")
g1.Groups.AddDef("销售审核_销档", "销档")
g1.Groups.AddDef("销售名称", "客户名称")
g1.Groups.AddDef("销售审核_吉", "吉")
g1.Groups.AddDef("销售审核_开piao", "piao")
g1.Totals.AddDef("销", AggregateEnum.Count,"销")
g1.Totals.AddDef("生产信息_类型", AggregateEnum.Count, "砼车数")
g1.Totals.AddDef("销量", "总方量")
g1.Totals.AddDef("销售_砼销额", "砼金额")
g1.Totals.AddDef("GDBFJE", "运输补助")
g1.Totals.AddDef("GDBCJE", "超时补助")
g1.Totals.AddDef("工地补助_工补其", "其他费用")
g1.Totals.AddDef("月调整_方量")
g1.Totals.AddDef("月调整_金额")
g1.VerticalTotal = True
g1.Filter = "[运输审核_结算月] = '" & bcty.text & "' and [销] = 'X' and [生产信息_类型] = '砼'"
dt1 = g1.BuildDataSource()
Dim g2 As New GroupTableBuilder("统计表1", DataTables("明细根表"))
Dim dt2 As fxDataSource
g2.Groups.AddDef("运输审核_结算月", "结算月")
g2.Groups.AddDef("销售名称", "客户名称")
g2.Totals.AddDef("生产信息_类型", AggregateEnum.Count, "水")
g2.Totals.AddDef("销售_水销额", "水金额")
g2.VerticalTotal = True
g2.Filter = "[运输审核_结算月] = '" & bcty.text & "' and [生产信息_类型] = '水'"
dt2 = g2.BuildDataSource()
Dim g3 As New GroupTableBuilder("统计表2", DataTables("泵送明细"))
Dim dt3 As fxDataSource
g3.Groups.AddDef("财务结算年月")
g3.Groups.AddDef("销售工地名称")
g3.Totals.AddDef("结算_销售","泵送费用")
g3.VerticalTotal = True
g3.Filter = "[财务结算年月] = '" & bcty.text & "'"
dt3 = g3.BuildDataSource()
Dim g4 As New GroupTableBuilder("统计表1", DataTables("明细根表"))
Dim dt4 As fxDataSource
g4.Groups.AddDef("运输审核_结算月", "结算月")
g4.Groups.AddDef("销售名称", "客户名称")
g4.Groups.AddDef("销售标号")
g4.Totals.AddDef("销售_砼销价", AggregateEnum.Average, "单价")
g4.Totals.AddDef("销量", "方/车")
g4.VerticalTotal = True
g4.Filter = "[运输审核_结算月] = '" & bcty.text & "' and [销] = 'X' and [销售标号] is not Null"
dt4 = g4.BuildDataSource()
Dim ar1() As String = {"结算月","客户名称"}
Dim ar2() As String = {"结算月","客户名称"}
Dim ar3() As String = {"财务结算年月","销售工地名称"}
Dim ar4() As String = {"结算月","客户名称"}
dt1.Combine(ar1,dt2,ar2)
dt1.Combine(ar1,dt3,ar3)
dt1.Combine(ar1,dt4,ar4)
Tables("数据统计_Table11").DataSource = dt1
Tables("数据统计_Table11").AutoSizeCols()
此主题相关图片如下:201904.png
[此贴子已经被作者于2019/5/6 21:16:12编辑过]