臨時列不能後台統計的:
Dim tzm,s1,s2 As String
tzm = "统计"
DataTables("订单明细表").Save()
Dim g As New CrossTableBuilder(tzm, DataTables("订单明细表"))
g.HGroups.AddDef("订货日期", DateGroupEnum.Year, "年")
g.HGroups.AddDef("订货日期", DateGroupEnum.Quarter, "季")
g.HGroups.AddDef("客户名称")
g.VGroups.AddDef("已付款")
g.Totals.AddDef("数量", "数量")
g.Totals.AddDef("金额", "金额")
g.HorizontalTotal = True
g.Decimals = 0
g.Filter = "客户名称 Is not null"
'g.Subtotal = True
g.FromServer = True '后台统计
g.Build()
For Each dc As DataCol In DataTables(tzm).DataCols
s1=dc.Caption.split("_")(0)
If "False,True".Contains(s1) Then
s2=Iif (s1=False,"未付款","已付款")
dc.Caption = dc.Caption.Replace(s1,s2)
End If
Next
DataTables(tzm).BuildHeader()
MainTable = Tables(tzm)