Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
如统计工资表:
01日 02日 04日 05日 。。。
张三 30 40 30 20
李四 20 30 50 40
03日由于休息没工资,统计的时候03日就没了。
虽然标题上有日期,但是对应的列名确是
01日 金额_1
02日 金额_2
04日 金额_3
05日 金额_4
于是我统计后放入模板上就变成了。
01日 02日 03日 04日 。。。
张三 30 40 30 20
李四 20 30 50 40
怎么办啊
不是啊!
我需要的报表是这样的:
01日 02日 03日 04日 05日 。。。
张三 30 40 30 20
李四 20 30 50 40
但是现在确是:
01日 02日 03日 04日 。。。
张三 30 40 30 20
李四 20 30 50 40
我的代码:
Dim Filter As String = "[姓名]<>''"
Dim Y As Integer = Forms("选择月份").Controls("TextBox1").Value
Dim M As Integer = Forms("选择月份").Controls("TextBox2").Value
Dim SD As Date = New Date(Y,M,1)
Dim Days As Integer = Date.DaysInMonth(Y,M)
Dim ED As Date = New Date(Y,M,Days)
Filter = Filter & "And [日期] >= #" & SD & "# And [日期]<= #" & ED & "#"
If Forms("选择月份").Controls("CheckBox1").Checked = False Then
Filter = Filter & "And [部门]<>'C'"
End If
If Forms("选择月份").Controls("CheckBox2").Checked = False Then
Filter = Filter & "And [部门]<>'G'"
End If
If Forms("选择月份").Controls("CheckBox3").Checked = False Then
Filter = Filter & "And [部门]<>'I'"
End If
If Forms("选择月份").Controls("CheckBox4").Checked = False Then
Filter = Filter & "And [部门]<>'开后'"
End If
If Forms("选择月份").Controls("CheckBox5").Checked = False Then
Filter = Filter & "And [部门]<>'小后'"
End If
If Forms("选择月份").Controls("CheckBox6").Checked = False Then
Filter = Filter & "And [部门]<>'观澜'"
End If
If Forms("选择月份").Controls("CheckBox7").Checked = False Then
Filter = Filter & "And [部门]<>'机器房'"
End If
Dim g As New CrossTableBuilder("计件工资", DataTables("计件表"), Filter)
g.HGroups.AddDef("部门")
g.HGroups.AddDef("姓名")
g.VGroups.AddDef("日期", DateGroupEnum.Day, "{0}日")
g.Totals.AddDef("金额", "金额")
g.HorizontalTotal = True
g.VerticalTotal = True
g.Decimals = 1
g.Build()
Dim Book As New XLS.Book(ProjectPath & "Attachments\计件工资模板.xls")
Dim fl As String = ProjectPath & "Reports\计件工资" & Y & "-" & M & ".xls"
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Book.Build() '生成细节区
Book.Save(fl) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = fl
Proc.Start()
我细说一下
我需要的报表是这样的(Excel)
01日 02日 03日 04日 05日 。。。
张三 30 40 30 20
李四 20 30 50 40
但是现在确是:
01日 02日 03日 04日 。。。
张三 30 40 30 20
李四 20 30 50 40
在员工计件里面的月末基本工资统计
下载信息 [文件大小: 下载次数: ] | |
![]() |
代码在哪个表的那个窗口?你说的员工计件表和月末基本工资统计窗口,我没找到