.Head.AddRow(nms)
.body.AddRow("汇总","","","",DataTables("财务流水").compute("sum(收入)","[部门] = '" & s & "'"),DataTables("财务流水").compute("sum(支出)","[部门] = '" & s & "'"))
For Each r As DataRow In DataTables("财务流水").sqlSelect("[部门] = '" & s & "'", "", "日期 Desc")
With .Body.AddRow(r("经手人"),r("编号"),r("科目"),r("摘要"))
.AddCell(Format(r("收入"),"#0.00"))
.AddCell(Format(r("支出"),"#0.00"))
.AddCell(Format(r("日期"),"MM月dd日"))
End With
Next
[此贴子已经被作者于2018/2/11 10:22:33编辑过]