以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 怎么在这个的基础上按照序号来分段显示一个小计 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=151658) |
-- 作者:wujie -- 发布时间:2020/6/30 13:55:00 -- 怎么在这个的基础上按照序号来分段显示一个小计 Dim d1 As Date = e.Form.Controls("B").Value Dim d2 As Date = e.Form.Controls("C").Value Dim s As String = e.Form.Controls("A").Value Dim cmb As WinForm.ComboBox = e.form.Controls("ComboBox1") If d1 = Nothing Or d2 = Nothing Then MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning) Else With DataTables("生产记录") .LoadFilter = "日期>=#" & d1 & "# and 日期<=#" & d2 & "# and 配方名称 = \'" & s & "\'" .Load() End With Dim b As New GroupTableBuilder("统计表5",DataTables("生产记录")) b.Groups.AddDef("原料名称") b.Groups.AddDef("序号") b.Build MainTable = Tables("统计表5") cmb.ComboList = DataTables("统计表5").GetComboListString("序号") End If Dim mb As WinForm.ComboBox mb = Forms("窗口2").Controls("ComboBox1") e.form.controls("D").text = mb.ComboList.split("|").length Dim d11 As Date = e.Form.Controls("B").Value Dim d12 As Date = e.Form.Controls("C").Value Dim s1 As String = e.Form.Controls("A").Value If d1 = Nothing Or d2 = Nothing Then MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning) Else With DataTables("生产记录") .LoadFilter = "日期>=#" & d11 & "# and 日期<=#" & d12 & "# and 配方名称 = \'" & s1 & "\'" .Load() End With Dim b1 As New GroupTableBuilder("统计表3",DataTables("生产记录")) b1.Groups.AddDef("日期") b1.Groups.AddDef("配方名称") b1.Groups.AddDef("原料名称") b1.Groups.AddDef("设定值") b1.Groups.AddDef("实际值") b1.Groups.AddDef("误差值") b1.Groups.AddDef("序号") b1.Build MainTable = Tables("统计表3") \' Tables("窗口2_Table1").DataSource = b1.BuildDataSource() End If
|
-- 作者:有点蓝 -- 发布时间:2020/6/30 13:57:00 -- 设置一下汇总模式:http://www.foxtable.com/webhelp/topics/1372.htm |
-- 作者:wujie -- 发布时间:2020/6/30 14:11:00 -- 这个分出来了,但是没有统计数字 Dim d1 As Date = e.Form.Controls("B").Value Dim d2 As Date = e.Form.Controls("C").Value Dim s As String = e.Form.Controls("A").Value Dim cmb As WinForm.ComboBox = e.form.Controls("ComboBox1") If d1 = Nothing Or d2 = Nothing Then MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning) Else With DataTables("生产记录") .LoadFilter = "日期>=#" & d1 & "# and 日期<=#" & d2 & "# and 配方名称 = \'" & s & "\'" .Load() End With Dim b As New GroupTableBuilder("统计表5",DataTables("生产记录")) b.Groups.AddDef("原料名称") b.Groups.AddDef("序号") b.Build MainTable = Tables("统计表5") cmb.ComboList = DataTables("统计表5").GetComboListString("序号") End If Dim mb As WinForm.ComboBox mb = Forms("窗口2").Controls("ComboBox1") e.form.controls("D").text = mb.ComboList.split("|").length Dim d11 As Date = e.Form.Controls("B").Value Dim d12 As Date = e.Form.Controls("C").Value Dim s1 As String = e.Form.Controls("A").Value If d1 = Nothing Or d2 = Nothing Then MessageBox.Show("日期都不能为空","友情提醒",MessageBoxButtons.OK,MessageBoxIcon.Warning) Else With DataTables("生产记录") .LoadFilter = "日期>=#" & d11 & "# and 日期<=#" & d12 & "# and 配方名称 = \'" & s1 & "\'" .Load() End With Dim b1 As New GroupTableBuilder("统计表3",DataTables("生产记录")) b1.Groups.AddDef("日期") b1.Groups.AddDef("配方名称") b1.Groups.AddDef("原料名称") b1.Groups.AddDef("设定值") b1.Groups.AddDef("实际值") b1.Groups.AddDef("误差值") b1.Groups.AddDef("序号") b1.Build MainTable = Tables("统计表3") \' Tables("窗口2_Table1").DataSource = b1.BuildDataSource() End If Dim g As New Subtotalgroup g.GroupOn = "序号" g.TotalOn = "设定值,实际值,误差值" With Tables("生产记录") .SubtotalGroups.Clear() .SubtotalGroups.Add(g) .Subtotal() \'生成汇总模式 End With
|
-- 作者:有点蓝 -- 发布时间:2020/6/30 14:15:00 -- With Tables("统计表3") |
-- 作者:wujie -- 发布时间:2020/6/30 14:30:00 -- 显示这个错误代码 Invalid value for AggregateEnum parameter 参数名:Agg Type
|
-- 作者:有点蓝 -- 发布时间:2020/6/30 14:31:00 -- 请上传实例说明 |