以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  统计按勾选复选框  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=129095)

--  作者:青丘狐
--  发布时间:2018/12/21 12:30:00
--  统计按勾选复选框
统计按勾选复选框,请老师修改下代码,谢谢!
图片点击可在新窗口打开查看此主题相关图片如下:ggtj.jpg
图片点击可在新窗口打开查看
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:统计按勾选复选框.rar

[此贴子已经被作者于2018/12/21 12:30:57编辑过]

--  作者:有点甜
--  发布时间:2018/12/21 14:26:00
--  

参考

 

Dim t As Table = Tables("仓库入库明细")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = False
t.SpillNode = True

If e.Form.Controls("年_复选框").checked Then
    g = New Subtotalgroup
    g.Aggregate = AggregateEnum.Sum
    g.GroupOn = "入库时间"
    g.TotalOn = "重量,重量审核"
    g.Caption = "{0}年 小计"
    g.DateGroup = DateGroupEnum.Year
    t.SubtotalGroups.Add(g)
End If
If e.Form.Controls("月_复选框").checked Then
    g = New Subtotalgroup
    g.Aggregate = AggregateEnum.Sum
    g.GroupOn = "入库时间"
    g.TotalOn = "重量,重量审核"
    g.Caption = "{0}月 小计"
    g.DateGroup = DateGroupEnum.Month
    t.SubtotalGroups.Add(g)
End If
If e.Form.Controls("品种_复选框").checked Then
    g = New Subtotalgroup
    g.Aggregate = AggregateEnum.Sum
    g.GroupOn = "品种"
    g.TotalOn = "重量,重量审核"
    g.Caption = "{0} 小计"
    t.SubtotalGroups.Add(g)
End If
If e.Form.Controls("钢种_复选框").checked Then
    g = New Subtotalgroup
    g.Aggregate = AggregateEnum.Sum
    g.GroupOn = "钢种"
    g.TotalOn = "重量,重量审核"
    g.Caption = "{0} 小计"
    t.SubtotalGroups.Add(g)
End If
If e.Form.Controls("规格_复选框").checked Then
    g = New Subtotalgroup
    g.Aggregate = AggregateEnum.Sum
    g.GroupOn = "规格"
    g.TotalOn = "重量,重量审核"
    g.Caption = "{0} 小计"
    t.SubtotalGroups.Add(g)
End If
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "*"
g.TotalOn = "重量,重量审核"
g.Caption = "总计"
t.SubtotalGroups.Add(g)

t.Subtotal()