-- [求助]多条件统计
老师好,我想在“房屋主体”后面再加一个统计条件“单间名称”
If e.DataCol.name = "年" OrElse e.DataCol.name = "房屋主体" Then
If e.DataRow.Isnull("年") = False AndAlso e.DataRow.Isnull("房屋主体") = False Then
Dim filter1 As String = "名称_房屋主体 = \'" & e.DataRow("房屋主体") & "\'"
For i As Integer = 1 To 12
Dim d As Date = new Date(val(e.DataRow("年")), i, 1)
Dim sum As Integer = DataTables("租房数据汇总").compute("sum(累计缴费)", filter1 & " and 抄表日期 >= #" & d & "# and 抄表日期 < #" & d.addmonths(1) & "#")