请问分组汇总后,小计行,总计行的列如何实现重新计算?
' 快速日报表
Dim g As New GroupTableBuilder("成瓷日报表", DataTables("成瓷报表"))
g.Caption = "成瓷日报表"
g.Groups.AddDef("报表日期", DateGroupEnum.Year, "年")
g.Groups.AddDef("报表日期", "月")
g.Groups.AddDef("报表日期", DateGroupEnum.Day, "日")
g.Totals.AddDef("出窑总数")
g.Totals.AddDef("合格总数")
g.Totals.AddDef("产值", "合格率")
g.Totals.AddDef("复火总数")
g.Totals.AddDef("复火合格数")
g.Totals.AddDef("产值", "复火合格率")
g.Totals.AddDef("复火缺陷数")
g.Totals.AddDef("缺陷总数")
g.Totals.AddDef("出窑板次")
g.Totals.AddDef("产值")
g.VerticalTotal = True
g.SubTotal = True
g.Decimals = 2
g.Build()
MainTable = Tables("成瓷日报表")
For Each R As Row In Tables("成瓷日报表").RowS
r("合格率") = R("合格总数") / R("出窑总数")
r("复火合格率") = R("复火合格数") / R("复火总数")
Next
Tables("成瓷日报表").DataTable.DataCols("合格率").SetFormat("0.00%")
Tables("成瓷日报表").DataTable.DataCols("复火合格率").SetFormat("0.00%")
' 结束