e.Form.Controls("Table1").Visible = True
Dim g As New GroupTableBuilder("统计表1", DataTables("平张4开机工价"))
g.Groups.AddDef("日期", DateGroupEnum.Year, "年")
g.Groups.AddDef("日期", "月")
g.Groups.AddDef("日期", DateGroupEnum.Day, "日")
g.Groups.AddDef("人员")
g.Totals.AddDef("总印次", "总印次/天")
g.SubTotal = True
g.FromServer = True
g.Build()
'DataTables("统计表1").DataCols.Add("工资", Gettype(Double))
Tables("平张机4开工资直接统计_Table1").DataSource = g.BuildDataSource()
Tables("平张机4开工资直接统计_Table1").DataTable.DataCols.Add("工资", Gettype(Double))
For Each dr As Row in Tables("平张机4开工资直接统计_Table1").Rows
If dr("总印次/天")<70000 Then
dr("工资")=dr("总印次")/70000 * dr("总印次/天") * 26 / 10000
Else If dr("总印次/天")>=70000 Then
dr("工资")=((dr("总印次/天") - 70000) * 26 * 1.5 + 70000 * 26 ) / 10000
End If
Next
[此贴子已经被作者于2014-8-19 17:55:30编辑过]