自己转下C#.Try Dim myDataSet As DataSet = New DataSet() '建立一张表并添加列 Dim tTable As DataTable = New DataTable("table") Dim a As DataColumn = New DataColumn("a") Dim b As DataColumn = New DataColumn("b") Dim c As DataColumn = New DataColumn("c") tTable.Columns.Add(a) tTable.Columns.Add(b) tTable.Columns.Add(c) '将新表填充到数据集 myDataSet.Tables.Add(tTable) Dim newRow As DataRow '在这里赋值,如果数据不只一条,可以用循环 newRow = tTable.NewRow() newRow("a") = "查询的值" newRow("b") = "查询的值" newRow("c") = "查询的值" tTable.Rows.Add(newRow) '数据集myDataSet为所求 Catch ex As Exception End Try
Dim myDataSet As DataSet = New DataSet()
'建立一张表并添加列
Dim tTable As DataTable = New DataTable("table")
Dim a As DataColumn = New DataColumn("a")
Dim b As DataColumn = New DataColumn("b")
Dim c As DataColumn = New DataColumn("c") tTable.Columns.Add(a)
tTable.Columns.Add(b)
tTable.Columns.Add(c) '将新表填充到数据集
myDataSet.Tables.Add(tTable) Dim newRow As DataRow '在这里赋值,如果数据不只一条,可以用循环
newRow = tTable.NewRow()
newRow("a") = "查询的值"
newRow("b") = "查询的值"
newRow("c") = "查询的值"
tTable.Rows.Add(newRow) '数据集myDataSet为所求
Catch ex As Exception End Try
水晶报表只能指定一个datatable吗??
这个是我一直犹豫的问题
大家要是有好的方法请继续赐教