-- 作者:石四
-- 发布时间:2014/11/12 15:53:00
-- 头晕眼花,没折了
Tables("部门考勤_Table3").StopRedraw Dim Filter As String Dim curB As String = e.Form.Controls("bm1").Value Dim curE As Date = e.Form.Controls("日期2").Value \'结束日期 Dim curS As Date = e.Form.Controls("日期1").Value \'起始日期 Filter = Filter & "考勤日期 >= #" & curS & "#" & " And 考勤日期 <= #" & curE & "#" & " And 部门 = #" & curB & "#"
Dim bd0 As New GroupTableBuilder("考勤机",DataTables("考勤机数据"))
Bd0.C Dim dt0 As fxDataSource Bd0.Groups.AddDef("姓名") \'根据型号分组 Bd0.Totals.AddDef("实出勤d","考勤机_出勤") \'对数量进行统计 Bd0.Totals.AddDef("请假h","考勤机_请假") \'对数量进行统计 Bd0.Filter = Filter Dt0 = bd0.BuildDataSource()
Dim bd1 As New GroupTableBuilder("部门",DataTables("部门考勤")) Bd1. C Dim dt1 As fxDataSource bd1.Groups.AddDef("部门") \'根据型号分组 bd1.Groups.AddDef("姓名") \'根据型号分组 bd1.Totals.AddDef("出勤","部门考勤_出勤") \'对数量进行统计 bd1.Totals.AddDef("请假","部门考勤_请假") \'对数量进行统计 bd1.Filter = Filter dt1 = bd1.BuildDataSource()
dt1.Combine("姓名",dt0,"姓名") \'将销售统计数据组合到进货统计数据 Tables("部门考勤_Table3").DataSource = dt1 \'将统计结果绑定到Table
此主题相关图片如下:捕获.png
[此贴子已经被作者于2014-11-12 15:54:38编辑过]
|