以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 组合统计结果 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=96677) |
-- 作者:lk15502 -- 发布时间:2017/2/26 8:46:00 -- 组合统计结果 下面两端代码是不同统计条件对同一个表的统计,请问老师怎么把两个结果组合在一个统计表上 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 |
-- 作者:有点色 -- 发布时间:2017/2/26 16:53:00 -- 参考
http://www.foxtable.com/webhelp/scr/2305.htm
http://www.foxtable.com/webhelp/scr/2392.htm
|