If r.IsGroup '如果是分组行 Dim f As String = val & " = '" & r(val) & "'" msgbox(f) Dim v As String = " 违章件数:" & t.Compute("Count(代号)",f) v = v & " 考核分数:" & t.Compute("Sum(考核分数)",f) 'v = v & " 订购金额:" & t.Compute("Sum(金额)",f) r("违章条例") = "统计项目:" & val & v End If