strSQL = "Select * from TableName"
da = New SqlDataAdapter(strSQL, conn)
Dim ds As New DataSet()
da.Fill(ds, "TableName")
Dim RptDoc As New ReportName()
RptDoc.SetDataSource(ds)
' 給RptDoc 指定數據,
CrystalView1.ReportSource = RptDoc '給CrystalView指定數據
CrystalView1.DataBind()
conn.Close()