我是使用asp.net的新手我的后端语言是vb.net当我尝试运行时没有记录会显示我认为我无法在我的数据集中填充我的数据表但是当我尝试使用数据网格时它工作我猜我的问题是使用我的组件,如ReportViewer任何人都可以告诉我我缺少什么?这是我的代码: 私有函数loadtransactionreport()As String
Dim iQuery As String = ""
iQuery = " Select * from Scheduleforpass "
Using xcon As New SqlConnection(connectionclass.ConnectionString)
Using xcom As New SqlCommand(iQuery, xcon)
With xcom
.CommandType = Data.CommandType.Text
End With
Dim xAdapter As New SqlDataAdapter(xcom)
Try
xcon.Open()
Dim xsched As New XtraReport1
xAdapter.Fill(xscheddatset, "Scheduleforpass")
xsched.DataSource = xscheddatset
xsched.DataMember = "Scheduleforpass"
xsched.CreateDocument()
Catch ex As SqlException
MsgBox(ex.Message.ToString, MsgBoxStyle.Exclamation, "Error<LoadPassengers>")
Finally
xcon.Close()
End Try
End Using
End Using
Return Nothing
End Function