例如:
Dim g As New CrossTableBuilder("统计表1", DataTables("订单"))
g.HGroups.AddDef("产品")
g.VGroups.AddDef("客户")
g.Totals.AddDef("数量", "数量")
g.HorizontalProportion = True
g.VerticalProportion = True
Tables("窗口1_Table1").DataSource = g.BuildDataSource
For Each dc As DataCol In DataTables("窗口1_Table1").DataCols
If dc.Caption.IndexOf("占比") >= 0 OrElse dc.Caption.IndexOf("份额") >= 0
dc.SetFormat("0.00%")
End If
Next