Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
sqlcon = New SqlConnection("server=.;user=sa;database=ticket")
sqlstr = "select * from tickets"
ds = New DataSet
sqldar = New SqlDataAdapter(sqlstr, sqlcon)
sqldar.Fill(ds, "tickets")
Me.DataGridView1.DataSource = ds.Tables("tickets").DefaultView
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.MdiParent = Form1
Me.Top = 20
Me.Left = 100
Me.Width = 800
Me.Height = 650
MyCR.SetDataSource(ds)
Me.CrystalReportViewer1.ReportSource = MyCR
End Sub
为什么我在这里把DataSet做为数据源,绑定到CrystalReport上,就是不显示数据,为什么呢?
期待高人解答。。。。。。