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
