Dim b As New CrossTableBuilder("统计表2", DataTables("采购汇总窗口_Table1"))
b.HGroups.AddDef("供方") \'
b.VGroups.AddDef("采购日期", DateGroupEnum.Year, "{0}年") \'
b.VGroups.AddDef("采购日期", "{0}月") \'
b.Totals.AddDef("数量","数量") \'
b.Totals.AddDef("金额","金额") \'
b.VerticalTotal= True \'
b.HorizontalTotal = True \'
Tables("采购汇总窗口_Table2").DataSource = b.BuildDataSource() \'
合并成是临时表,"Table1"、窗口_"Table1"后,下面代码执行第一次,正常统计,再执行时,报错,找不到供方,
Dim b As New CrossTableBuilder("统计表2", DataTables("采购汇总窗口_Table1"))
b.HGroups.AddDef("品名") \'
b.VGroups.AddDef("采购日期", DateGroupEnum.Year, "{0}年") \'
b.VGroups.AddDef("采购日期", "{0}月") \'
b.Totals.AddDef("数量","数量") \'
b.Totals.AddDef("金额","金额") \'
b.VerticalTotal= True \'
b.HorizontalTotal = True \'
Tables("采购汇总窗口_Table2").DataSource = b.BuildDataSource() \'
如何解决?