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
DataTables("日统计").ReplaceFor("收_其它",0,"收_其它 is null")
DataTables("日统计").ReplaceFor("支_对公",0,"支_对公 is null")
DataTables("日统计").ReplaceFor("支_对私",0,"支_对私 is null")