title: Show crystal report using DataSet object using Access 2003 Database
body: <p>Private Sub frmReportExpenses_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load</p>
  
  <pre><code>    Dim objDatasetExpence As New dSetExpences   // dataset object named as dSetExpences
      Dim objRptExpence As New rptExpences       // Crystal report object
      Dim MyCommand As New OleDbCommand()
      Dim MyConnection As OleDbConnection
      Dim myDA As New OleDbDataAdapter()
  
      Try
          Dim connstring As String = "D:\HMSProjects\SMS\SMS\bin\Debug\"
          MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + connstring + "msautoconfig.mdb;")
          MyConnection.Open()
          MyCommand.Connection = MyConnection
  
          MyCommand.CommandText = "SELECT * FROM expences"
          MyCommand.CommandType = CommandType.Text
          myDA.SelectCommand = MyCommand
  
          myDA.Fill(objDatasetExpence, "expences")
          objRptExpence.SetDataSource(objDatasetExpence)
          CrystalReportViewer1.ReportSource = objRptExpence
      Catch ex As Exception
  
      End Try
  
      Me.WindowState = FormWindowState.Maximized
  End Sub
  </code></pre>
  
  <p>End Class</p>
  
  <p>whats wrong in above code its not working. i want to show crystal report using Access 2003 Database pragmatically. blank report is added in project and trying to fill it DataSet object, any suggestion or correction in above code. its a windows form application</p>