'If vars("filter") <> "" Then
'dt.Filter=vars("filter")
'End If
Dim dtb As New DataTableBuilder("占比统计表")
dtb.AddDef("年龄",Gettype(String),32)
dtb.AddDef("人数", Gettype(Integer))
t=dtb.Build()
For Each c As String In cs.split(",")
Dim dr1 As DataRow = t.AddNew()
Dim val As Integer = zd2(c)
dr1("年龄") = c
If val = 50 Then
dr1("人数") = dt.Compute("Count(name)", "age" & " < 60 " )
Else If val = 90
dr1("人数") = dt.Compute("Count(name)", "age" & " >= 90" )
Else
dr1("人数") = dt.Compute("Count(name)", "age" & " >= " & val & " And " & "age" & " < "& val+10 &"" )
End If
Next
'dt.Filter=""
红色部分是条件,可以吧那个条件放到compute语句中么?