Dim ColRelation1() As String
Dim ColRelation2() As String
Dim b As New SQLGroupTableBuilder("统计表1","工艺卡工序操作员表")
b.C
b.AddTable("工艺卡工序操作员表","ID","工艺卡工序表","_Identify")
b.AddTable("工艺卡工序操作员表","生产单号","工艺卡主表","生产单号")
b.AddTable("工艺卡主表","品种","品种表","品种编码")
b.AddTable("工艺卡工序表","工序编码","工序表","工序编码")
b.AddTable("工艺卡工序表","部门编码","部门表","部门编码")
ColRelation1=New String() {"质检人编码","所属年度"}
ColRelation2=New String() {"员工编码","所属年度"}
b.AddTable("工艺卡工序表",ColRelation1,"员工表",ColRelation2)
ColRelation1=New String() {"操作工编码","所属年度"}
ColRelation2=New String() {"员工编码","所属年度"}
b.AddTable("工艺卡工序操作员表",ColRelation1,"员工表",ColRelation2)
b.Groups.AddDef("{工艺卡工序操作员表}.生产单号")
b.Groups.AddDef("投产日期",DateGroupEnum.None)
b.Groups.AddDef("加工要求")
b.Groups.AddDef("品种名称")
b.Groups.AddDef("工序名称")
b.Groups.AddDef("报工日期")
b.Groups.AddDef("部门名称")
b.Groups.AddDef("质检人编码")
b.Groups.AddDef("员工姓名","质检人姓名")
b.Groups.AddDef("操作工编码")
b.Groups.AddDef("员工姓名","操作工姓名")
b.Totals.AddDef("实际完成数量")
b.Totals.AddDef("操作工罚款")
b.VerticalTotal=True
Tables(e.Form.Name & "_Table1").DataSource = b.BuildDataSource
工艺卡工序表和工艺卡工序操作员表都与员工表关联,这样添加的员工表就会重复,怎样可以进行区分呀?在添加分组列的时候可以分别取出对应的员工姓名?