If e.Book.TempLate = "收入明细" Then If e.DataRow IsNot Nothing Then Dim Filter1 As String = "日期 = '" & e.DataRow("日期") & "'" Dim tj1,tj2,tj3,tj4,tj5,tj6,tj7,tj8 As Double tj1 = DataTables("收入明细").Compute("Sum(日销售额)",Filter1) tj2 = DataTables("收入明细").Compute("Sum(POS刷卡)",Filter1) tj3 = DataTables("收入明细").Compute("Sum(客户欠款)",Filter1) tj4 = DataTables("收入明细").Compute("Sum(客户还款)",Filter1) tj5 = DataTables("收入明细").Compute("Sum(产品返利)",Filter1) tj6 = DataTables("收入明细").Compute("Sum(其它存款)",Filter1) tj7 = DataTables("收入明细").Compute("Sum(应收帐款)",Filter1) tj8 = DataTables("收入明细").Compute("Sum(实收帐款)",Filter1) e.Book.Marks("标记") = "收入说明:日销售额" & tj1 & "元,POS刷卡" & tj2 & "元,客户欠款" & tj3 & "元,客户还款" & tj4 & "元,产品返利" & tj5 & "元,其它存款" & tj6 & "元,应收帐款" & tj7 & "元,实收帐款" & tj8 & "元" End If ElseIf e.Book.TempLate = "收支明细" Then If e.DataRow IsNot Nothing Then Dim Filter1 As String = "日期 = '" & e.DataRow("日期") & "'" Dim tj1,tj2,tj3,tj4,tj5,tj6,tj7,tj8 As Double tj1 = DataTables("收支汇总").Compute("sum(收入_应收帐款)",Filter1) tj2 = DataTables("收支汇总").Compute("Sum(收入_实收帐款)",Filter1) tj3 = DataTables("收支汇总").Compute("Sum(支出_应支帐款)",Filter1) tj4 = DataTables("收支汇总").Compute("Sum(支出_实支帐款)",Filter1) tj5 = tj1-tj3 tj6 = tj2-tj4 e.Book.Marks("A") = tj1 e.Book.Marks("B") = tj2 e.Book.Marks("C") = tj3 e.Book.Marks("D") = tj4 e.Book.Marks("E") = tj5 e.Book.Marks("F") = tj6 End If End If
|