Does anyone know how to create a crystal report using an existing dataset? The dataset is currently been filled with an access db. I am trying to use the dataset to fill the information that I want to display. Everytime I call the routine I received an error "object reference not set to an instance of an object".
Here is my code.
Dim frmViewer As New frmReportViewer
With frmViewer
Dim MyMDIParent = Me.MdiParent.FindForm
.StartPosition = formStartPosition.CenterScreen
.TopMost = True
.MdiParent = MyMDIParent
.WindowState = FormWindowState.Normal
Dim rptEmployee As New rptEmployeeInfo
rptEmployee.SetDataSoure = dsEmployee1
.crvReport.ReportSource = rptEmployee
.crvReport.Zoom(2)
.Show()
End With
Thanks in advance
Here is my code.
Dim frmViewer As New frmReportViewer
With frmViewer
Dim MyMDIParent = Me.MdiParent.FindForm
.StartPosition = formStartPosition.CenterScreen
.TopMost = True
.MdiParent = MyMDIParent
.WindowState = FormWindowState.Normal
Dim rptEmployee As New rptEmployeeInfo
rptEmployee.SetDataSoure = dsEmployee1
.crvReport.ReportSource = rptEmployee
.crvReport.Zoom(2)
.Show()
End With
Thanks in advance