Foxtable(狐表)用户栏目专家坐堂 → [求助]统计直接四舍五入了


  共有2212人关注过本帖树形打印复制链接

主题:[求助]统计直接四舍五入了

帅哥哟,离线,有人找我吗?
yds
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:634 积分:3634 威望:0 精华:0 注册:2011/5/21 18:05:00
[求助]统计直接四舍五入了  发帖心情 Post By:2019/2/13 12:04:00 [显示全部帖子]

Dim dy As Date = Date.today
Dim Filter As String
Filter = "Y = '" & dy.AddMonths(-1).Year & "' And M = '" & dy.AddMonths(-1).Month & "'" 
Dim g As New SQLGroupTableBuilder("考勤统计", "考勤")
g.C
g.Filter = Filter
g.AddTable("考勤","姓名","人员","姓名")
g.Decimals = 2
g.Groups.AddDef("部门")
g.Groups.AddDef("{考勤}.姓名")
g.Totals.AddExp("考勤","考勤 / 480", "上班(天)")
g.Totals.AddExp("请假","请假 / 480","请假(天)")
g.Totals.AddExp("加班","加班 / 60","加班(小时)")
g.Totals.AddExp("迟到次","迟到次 * 1","迟到(次)")
g.Totals.AddExp("早退次","早退次 * 1","早退(次)")
g.Build()
MainTable = Tables("考勤统计")

统计结果考勤列的数都是整数,要怎么保留两位小数?

 回到顶部