Public Class Form3

    Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
        Dim mt As New CrystalReport1
       
        dtp("select * from vehiclelog ")

        da.Fill(ds, "vehiclelog")
        mt.SetDataSource(ds)
        Me.CrystalReportViewer1.ReportSource = mt
        Me.CrystalReportViewer1.Show()

        ' Form3.Show()
    End Sub
    Sub dtp(ByVal s As String) 'function is used to display a table
        If con.State = ConnectionState.Open Then
            con.Close()
        End If
        con.Open()
        da = New OleDb.OleDbDataAdapter(s, con)

    End Sub
End Class