组合多个SQLJoinTableBuilder法:
Dim n As Integer
Dim s As String
Dim dt1,dt2 As fxDataSource
Dim jb As SQLJoinTableBuilder
Dim ds As New List(Of String)
ds = DataTables("表A").GetUniqueValues("","日期")
For Each D As Date In ds
s = format(d,"yyyy年_M月_d")
jb =New SQLJoinTableBuilder("查询","表A")
jb.AddCols("车号")
jb.AddExp(s,"行程")
jb.Filter = "日期 = #" & D & "#"
If n =0 Then
dt1 = jb.BuildDataSource()
Else
dt2 = jb.BuildDataSource()
dt1.Combine("车号",dt2,"车号")
End If
n+=1
Next
Tables("窗口1_Table1").DataSource = dt1
[此贴子已经被作者于2011-12-27 12:10:43编辑过]