以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]SubtotalGroup 汇总模式中排序问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=185759)

--  作者:2900819580
--  发布时间:2023/3/15 8:59:00
--  [求助]SubtotalGroup 汇总模式中排序问题
Dim tb As Table = Tables(e.Form.Name & "_table1")
If tb.Current IsNot Nothing Then 
    Dim g As New SubtotalGroup \'定义一个新的分组
    g.GroupOn = "计件人" \'分组列为客户列
    g.TotalOn = "SCSL,小计" \'对数量和金额进行统计
       tb.Sort = "计件人,PrDate"  
    With tb
        .SubtotalGroups.Clear() \'清除原有的分组
        .SubtotalGroups.Add(g) \'加入刚刚定义的分组
    End With
    If tb.AllowEdit = True Then
        tb.ClearSubtotal
    Else
        tb.Subtotal() \'生成汇总模式    
    End If
End If
想按计件人和PrDate来进行排序。

图片点击可在新窗口打开查看此主题相关图片如下:无标题.png
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2023/3/15 9:09:00
--  
http://www.foxtable.com/webhelp/topics/3297.htm