下面两端代码是不同统计条件对同一个表的统计,请问老师怎么把两个结果组合在一个统计表上Dim dt1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker9")
Dim g As New GroupTableBuilder("统计表1", DataTables("计划配缸通知单"))
g.Groups.AddDef("品名大类")
g.Totals.AddDef("投坯重量")
g.Totals.AddDef("投坯匹数")
g.VerticalTotal = True
g.SubTotal = True
g.FromServer = True
g.filter = "配缸日期 = '" & dt1.value & "' and 配缸 = 1 and (缸号类型 = ‘改染’or 缸号类型 = ‘回修’)"
g.Build()
Tables(e.Form.Name & "_Table7").DataSource = g.Builddatasource()
Tables(e.Form.Name & "_Table7").DataTable.DataCols.Add("配缸日期",Gettype(String))
Tables(e.Form.Name & "_Table7").DataTable.ReplaceFor("配缸日期",format(dt1.value,"yyyy-MM-dd"))
Tables(e.Form.Name & "_Table7").AutoSizeCols
-----------------------------------------------------------------------------------------------------------------
Dim dt1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker9")
Dim g As New GroupTableBuilder("统计表1", DataTables("计划配缸通知单"))
g.Groups.AddDef("品名大类")
g.Totals.AddDef("投坯重量")
g.Totals.AddDef("投坯匹数")
g.VerticalTotal = True
g.SubTotal = True
g.FromServer = True
g.filter = "配缸日期 = '" & dt1.value & "' and 配缸 = 1 and (缸号类型 = ‘生产’or 缸号类型 = ‘生产子缸号’or 缸号类型 = ‘改染原缸号’or 缸号类型 = ‘印花原缸号’)"
g.Build()
Tables(e.Form.Name & "_Table7").DataSource = g.Builddatasource()
Tables(e.Form.Name & "_Table7").DataTable.DataCols.Add("配缸日期",Gettype(String))
Tables(e.Form.Name & "_Table7").DataTable.ReplaceFor("配缸日期",format(dt1.value,"yyyy-MM-dd"))
Tables(e.Form.Name & "_Table7").AutoSizeCols