-- 作者:chenjiu6202
-- 发布时间:2013/2/15 20:09:00
--
Dim qs As WinForm.DateTimePicker = e.Form.Controls("起始日期1") Dim zz As WinForm.DateTimePicker = e.Form.Controls("终止日期1") Dim tj1 As WinForm.ComboBox = e.Form.Controls("统计1") Dim tj2 As WinForm.ComboBox = e.Form.Controls("统计2")
此主题相关图片如下:q`zws9li%aq%}lnjzf@n_e.jpg
If e.Form.Controls("终止日期1").Value < e.Form.Controls("起始日期1").Value Then MessageBox.Show("请重新选择日期") e.Form.Controls("终止日期1").Value = Nothing e.Form.Controls("终止日期1").Select e.Form.Controls("起始日期1").Value = Nothing End If
If e.Form.Controls("统计1").Value = Nothing MessageBox.Show("请重新选择分组统计") End If
Dim t As Table = Tables("奖惩考核表") Dim g As Subtotalgroup Dim Val As String = Forms("数据汇总").Controls("统计1").Value
t.Filter = "[日期] <= #" & e.form.Controls("终止日期1").Value & "# and [日期] >= #" & e.form.Controls("起始日期1").Value & "#" t.SubtotalGroups.Clear() t.GroupAboveData = False t.TreeVisible = False t.SpillNode = True
g = New Subtotalgroup g.Aggregate = AggregateEnum.Sum g.GroupOn = val g.TotalOn = "考核分数" g.Caption = "{0}" t.SubtotalGroups.Add(g) t.Subtotal()\'
Dim r As Row
For i As Integer = 0 To t.Rows.Count(True) - 1 r = t.Rows(i,True) If r.IsGroup \'如果是分组行 Dim f As String = "" & val & " = \'" & r(val) & "\'" Dim v As String = " 违章件数:" & t.Compute("Count(代号)",f) v = v & " 考核分数:" & t.Compute("Sum(考核分数)",f) \'v = v & " 订购金额:" & t.Compute("Sum(金额)",f) r("违章条例") = "统计项目:" & val & v End If Next
此主题相关图片如下:8@mwg(`tj%o%{k)bo`w1opc.jpg
|