Dim drs As List(Of DataRow) = DataTables("缴费情况").SQLSelect("[缴费_月租_起计日期] >= #" & e.Form.Controls("StartDate").Value & "# And [缴费_月租_止计日期] <= #" & e.Form.Controls("EndDate").Value & "# And ([车牌号码] = '" & e.Form.Controls("DropBox1").text & "' Or [车牌号码] Is null)")
msgbox(drs.Count)
If drs.Count > 0 Then
……
With Tables("安费用所属期查询统计_Table1")
For i As Integer = .Rows.count - 1 To 0 Step -1
.Rows(i).Delete
Next
LockBaseMainForm() '锁定主界面
.StopRedraw()
msgbox(dt.datarows.count)
Dim b As New GroupTableBuilder("统计表1",dt)
b.Groups.AddDef("分类")
b.Groups.AddDef("住址_巷")
b.Groups.AddDef("住址_号")
b.Groups.AddDef("住址_房")
b.Groups.AddDef("姓名")
b.Groups.AddDef("手机号码")
b.Groups.AddDef("车牌号码")
b.Totals.AddDef("查询_月租_所属日期",AggregateEnum.Count,"查询_月租_缴费月数")
b.Totals.AddDef("查询_月租_缴费金额")
b.Subtotal = True
.DataSource = b.BuildDataSource()
msgbox(.rows.count)