1、试试
For Each na As String In nax
Dim b1 As New SQLGroupTableBuilder("多表统计2",na)
b1.C
If str2.Contains("|") Then
Dim values2() As String
values2 = str2.Split("|")
For x As Integer =0 To values2.Length-1
b1.Groups.AddDef(values2(x)) '只有一个分组列
Next
Else
b1.Groups.AddDef(str2) '只有一个分组列
End If
Select Case str5
Case "求和"
b1.Totals.AddDef(str6) '对统计列进行统计
Case "平均值"
b1.Totals.AddDef(str6,AggregateEnum.average) '对统计列进行统计
Case "记录数"
b1.Totals.AddDef(str6,AggregateEnum.Count)
Case "平均得分率"
Case "区间占比"
Case "区分度"
End Select
Dim dt = b1.build(True)
Dim f As New Filler
f.SourceTable = dt '指定数据来源
f.DataTable = DataTables("多表统计1") '指定数据接收表
f.Fill() '填充数据
Next
2、最后你【多表统计1】有多少行数据?
3、做个对应或者出错的实例发上来测试。