Dim smybgs As List(Of String)
smybgs = DataTables("统计分析报告同比同期占比").GetValues("所属单位")
dim b as new stringbuilder
For Each smybg As String In smybgs
Dim bb21 As Integer =DataTables("统计分析报告同比同期占比").sqlCompute("count(guid)")
b.Append("2023年度" & smybg & bb21 & "次,")
Dim smybgs1 As List(Of String)
smybgs1 = DataTables("统计分析报告同比同期占比").GetValues("事项类别","所属单位='" & smybg & "' and 事项类别<>'黔南州'","[_Identify] desc")
if smybgs1.count > 0
b.Appendline(",其中:")
end if
For Each smybg1 As String In smybgs1
b.Appendline(smybg1)
Dim drs As List(of DataRow) =DataTables("统计分析报告同比同期占比").SQLSelect("所属单位='" & smybg & "'And 事项类别='" & smybg1 & "'")
For Each r As DataRow In drs
b.Appendline("在" & r("事项名称") & "(" & r("年度总数") & ")次,与上年度同期占比" & r("年度同期占比"))
Next
Next
Next
output.show(b.tostring)