Dim tb4 As Table= Tables("排课_table4")
Dim g As New GroupTableBuilder("统计表1", DataTables("课程安排"))
g.Groups.AddDef("单位全称")
g.Groups.AddDef("学期")
g.Groups.AddDef("年级")
g.Groups.AddDef("班级")
tb4.DataSource = g.Build()
Dim Products As List(Of String) = DataTables("课程安排").GetValues("科目")
Dim lst As new List(of String)
lst.AddRange({"语文","数学","英语"})
For i As Integer = lst.Count - 1 To 0 Step -1
If Products.Contains(lst(i)) = False Then lst.RemoveAt(i)
Next
For Each v As String In lst
tb4.DataTable.DataCols.Add(v,Gettype(String))
Next
For Each r As Row In tb4.Rows
For Each v As String In DataTables("课程安排").GetValues("科目")
……