Foxtable(狐表)用户栏目专家坐堂 → 天统计


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

主题:天统计

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110581 积分:562801 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/11/17 15:38:00 [显示全部帖子]

DataTables("日统计").DataRows.Clear
Dim DateTimePicker1 As WinForm.DateTimePicker = Forms("财务汇总窗口").Controls("DateTimePicker11")
Dim d1 As Date = new Date(DateTimePicker1.Value.Year,DateTimePicker1.Value.Month,1)
Dim d2 As Date = d1.AddMonths(1).AddDays(-1)
For i As Integer = 0 To d2.Day - 1
    Dim dr As DataRow = DataTables("日统计").AddNew
    dr("统计日期") = d1.AddDays(i)
    dr("收_其它") = DataTables("其它收入").Compute("Sum(收入金额)","收入时间=#" & d1.AddDays(i) & "#")
    dr("支_对公") = DataTables("支出账目").Compute("Sum(合计价格)","支出日期=#" & d1.AddDays(i) & "#")
    dr("支_对私") = DataTables("支出明细").Compute("Sum(支出金额)","变动日期=#" & d1.AddDays(i) & "#")
Next

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110581 积分:562801 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/11/17 16:04:00 [显示全部帖子]

For i As Integer = 0 To d2.Day - 1
    Dim dr As DataRow = DataTables("日统计").AddNew
    dr("统计日期") = d1.AddDays(i)
dim sum as double = DataTables("其它收入").Compute("Sum(收入金额)","收入时间=#" & d1.AddDays(i) & "#")
    dr("收_其它") = sum
sum = DataTables("支出账目").Compute("Sum(合计价格)","支出日期=#" & d1.AddDays(i) & "#")
    dr("支_对公") = sum 
sum = DataTables("支出明细").Compute("Sum(支出金额)","变动日期=#" & d1.AddDays(i) & "#")
    dr("支_对私") = sum
Next

 回到顶部