以下是汇总代码,如何实现在汇总后的小计和总计实现百分比的重新计算,见图,如“交地率”列,分别在小计和总计中计算出“已交付用地数量/设计征地数量"的百分比?请老师指导
此主题相关图片如下:qq图片20180128112020.png
Dim t As Table = Tables("S征 情况表")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = False
t.TreeVisible = False
t.SpillNode = True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "项目名称"
g.TotalOn = "路线总长,设计征地数量,已交付用地数量,征 费用预算,征 预付款,业主结算补助金额,政府配套资金总额,已到位配套资金"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Sum
g.GroupOn = "*"
g.TotalOn = "路线总长,设计征地数量,已交付用地数量,征 费用预算,征 预付款,业主结算补助金额,政府配套资金总额,已到位配套资金"
g.Caption = "总计"
t.SubtotalGroups.Add(g)
t.Subtotal()