好久没来了,今天在使用交叉统计时,脑洞大开,想根据时段来统计数据,看了说明文件,CrossTableBuilder貌似没有Filter属性,下面这个代码修改成根据时段来统计数据?
Dim g As New CrossTableBuilder("月累计", DataTables("日报表"))
g.Caption = "**区域销售日报表"
g.HGroups.AddDef("销售单位", "", "日报表_销售单位")
g.HGroups.AddDef("市场部", "", "日报表_市场部")
g.VGroups.AddDef("填报日期", "{0}月")
g.VGroups.AddDef("填报日期", DateGroupEnum.Year, "{0}年")
Filter =
g.Totals.AddDef("本期A方数", "本期A方数")
g.Totals.AddDef("本期B方数", "本期B方数")
g.Totals.AddDef("本期C方数", "本期C方数")
g.Totals.AddDef("同期方数", AggregateEnum.Count, "同期方数")
g.Subtotal=True
g.Build()
MainTable = Tables("月累计")