窗口中的交叉表,要求将 “工位ID” 列的最后行(合计行)的值(图中的52和28)设置为空,如何修改代码,请各位老师指教,谢谢!!
Dim b As New SQLCrossTableBuilder("统计表","扎包记录")
b.C
b.HGroups.AddDef("批次序号","节拍")
b.VGroups.AddDef("日期",DateGroupEnum.None)
b.VGroups.AddDef("批次编号")
b.Totals.AddDef("工位ID")
b.Totals.AddDef("扎包产量","产量")
b.Totals.AddDef("工位工时","定额")
b.Totals.AddDef("插插间隔","实际")
b.Totals.AddDef("工效","效率")
b.Totals.AddDef("工位工价","加工费")
b.Filter = "日期 >= '" & d1 & "' And 日期 <= '" & d2 & "' and 人员ID = '" & ryid & "'"
b.HorizontalTotal = True '水平方向自动汇总
b.VerticalTotal = True '垂直方向自动汇总
Tables("员工查询_Table1").DataSource = b.BuildDataSource()
Dim t As Table = Tables("员工查询_Table1")
Dim i As Integer =(Tables("员工查询_Table1").Cols.Count - 7)/6
For Each r As Row In t.Rows
For k As Byte = 1 To i
DataTables("员工查询_Table1").DataCols("工位工时_" & k).SetFormat("0")
DataTables("员工查询_Table1").DataCols("工效_" & k).SetFormat("#0.00%")
DataTables("员工查询_Table1").DataCols("工位工价_" & k).SetFormat("0.00")
Tables("员工查询_Table1").Cols("扎包产量_" & k).TextAlign = TextAlignEnum.Center
Tables("员工查询_Table1").Cols("工位ID_" & k).TextAlign = TextAlignEnum.Center
Next
r("合计_效率") = r("合计_定额")/r("合计_实际")
Next
此主题相关图片如下:捕获17.png
[此贴子已经被作者于2016/6/14 23:28:47编辑过]