我的代码如下:
Dim d1,d2 As String
Dim kind,tongji As String
Dim sql As String
Dim str As String= e.Form.Controls("TextBox2").value
Dim n As Integer
Dim strs() As String
strs =str.replace(vbcr,"").Split(vblf)
n=strs.Length
Dim i As Integer
Dim dts(n) As fxDataSource
For i = 0 To n-1
If strs(i)>"" Then
-----
Dim g As New GroupTableBuilder("统计表" & i,sql)
If tongji=“性别” Then
g.Caption = "性别统计"
g.Groups.AddDef("性别", "", "性别")
g.Totals.AddDef("姓名", AggregateEnum.Count,"","病例数")
dts(i) = g.BuildDataSource()
End If
Next
For i =1 To n-1
dts(0).Combine("性别",dts(i),"性别")
Next
forms("统计图形").Open
Tables("统计图形_Table1").DataSource = dts(0)
有没有这种写法?谢谢!
[此贴子已经被作者于2013-12-25 9:28:08编辑过]