奇怪,相同的多层表头 标题怎么没有合并呢。。。
此主题相关图片如下:1.png
代码如下:
Dim bd3 As New SQLcrossTableBuilder("统计表3","陈列量")
Dim dt3 As fxDataSource
bd3.C
bd3.HGroups.AddDef("门店") '添加客户列用于水平分组
bd3.HGroups.AddDef("库位") '添加客户列用于水平分组
bd3.vGroups.AddDef("调整期间","调整期间_{0}_陈列sku数") '添加客户列用于水平分组
bd3.Totals.AddDef("陈列量") '添加数量列用于统计
dt3 = bd3.BuildDataSource()
Dim bd2 As New SQLcrossTableBuilder("统计表2","动销量")
Dim dt2 As fxDataSource
bd2.C
bd2.HGroups.AddDef("门店") '添加客户列用于水平分组
bd2.HGroups.AddDef("库位") '添加客户列用于水平分组
bd2.vGroups.AddDef("调整期间","调整期间_{0}_动销sku数") '添加客户列用于水平分组
bd2.Totals.AddDef("动销量") '添加数量列用于统计
dt2 = bd2.BuildDataSource()
Dim bd1 As New SQLcrossTableBuilder("统计表1","库位销售分析")
Dim dt1 As fxDataSource
bd1.C
bd1.HGroups.AddDef("门店") '添加客户列用于水平分组
bd1.HGroups.AddDef("库位") '添加客户列用于水平分组
bd1.HGroups.AddDef("销售日期",DateGroupEnum.year,"区间") '添加客户列用于水平分组
bd1.vGroups.AddDef("调整期间","调整期间_{0}_销售件数") '添加客户列用于水平分组
bd1.Totals.AddDef("销售数量","销售件数") '添加数量列用于统计
dt1 = bd1.BuildDataSource()
Dim nms As String() = {"门店","库位"} '指定连接列
dt3.Combine(nms,dt2,nms) '将销售统计数据组合到进货统计数据
dt3.Combine(nms,dt1,nms) '将销售统计数据组合到进货统计数据
Tables(e.Form.Name & "_table1").DataSource = dt3