以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 排序和汇总的问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=118429) |
-- 作者:vincent92 -- 发布时间:2018/5/2 17:43:00 -- 排序和汇总的问题 麻烦请问一下两个问题 一个是汇总行的字体能否修改,我通过窗口设置了一个汇总按钮,但是生成的汇总模式下数字我希望是有千分位,代码如下: Dim t As Table = Tables("超期") Dim g As Subtotalgroup t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False g = New Subtotalgroup g.Aggregate = AggregateEnum.Sum g.GroupOn = "分公司" g.Caption = "{0}" t.SubtotalGroups.Add(g) t.Subtotal() Dim r As Row For i As Integer = 0 To t.Rows.Count(True) - 1 r = t.Rows(i,True) If r.IsGroup \'如果是分组行 Dim f As String = "分公司 = \'" & r("分公司") & "\'" Dim v As String = " 超期金额:" & t.Compute("sum(超期金额)",f) v = v & " 超期余额:" & t.Compute("sum(超期余额)",f) v = v & " 坏账金额:" & t.Compute("sum(记账_180天以上)",f) r("分公司") = "分公司:" & r("分公司") & v End If Next 第二个问题是我想按照固定的顺序自定义排序,比方说原来顺序排列可能是A、B、C……,但是我希望有一个排序方式永远是A、C、B |
-- 作者:有点甜 -- 发布时间:2018/5/2 18:01:00 -- 1、
For i As Integer = 0 To t.Rows.Count(True) - 1
r = t.Rows(i,True)
If r.IsGroup \'如果是分组行
Dim f As String = "分公司 = \'" & r("分公司") & "\'"
Dim v As String = " 超期金额:" & format(t.Compute("sum(超期金额)",f), "#,###.00")
v = v & " 超期余额:" & t.Compute("sum(超期余额)",f)
v = v & " 坏账金额:" & t.Compute("sum(记账_180天以上)",f)
r("分公司") = "分公司:" & r("分公司") & v
End If
Next
2、你要额外加一个排序列,输入数值,根据此列排序
|