Ok, I tried the following:

I added a new form to my project.
On that form I placed a CrystalReportViewer.
Then I created a report using the new report wizzard.
I made a connection using the 'create new connection'.
When I open the report it works and I get the data I want to see.

But here is my problem:
Now I select another database.
But my report shows the data of the database I set the connection in my crystal report to.

I used the following code:

VB Code:
  1. Imports System.Data
  2. Imports System.Data.OleDb
  3.  
  4. Public Class Report
  5.   Dim myConnection As New OleDb.OleDbConnection
  6.  
  7.   Private Sub Report_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8.     myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath
  9.     myConnection.Open()
  10.  
  11.     Dim CrystalReportViewer1 As CrystalDecisions.Windows.Forms.CrystalReportViewer = New CrystalDecisions.Windows.Forms.CrystalReportViewer
  12.     Dim Report As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument
  13.     CrystalReportViewer1.ActiveViewIndex = 0
  14.     CrystalReportViewer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
  15.     CrystalReportViewer1.DisplayGroupTree = False
  16.     CrystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill
  17.     CrystalReportViewer1.Location = New System.Drawing.Point(0, 0)
  18.     CrystalReportViewer1.Name = "CrystalReportViewer1"
  19.  
  20.     Dim QueryString As String = "select * from tblLand" 'Your Query here
  21.     'Dim Connection As New OleDbConnection(funcs.con) 'Your Database Connection Here
  22.     'Connection.Open()
  23.     Dim Adapter As OleDbDataAdapter = New OleDbDataAdapter(QueryString, myConnection) 'Passing the query in the connection
  24.     Dim DataSet As DataSet = New DataSet() 'DataSet
  25.     Adapter.Fill(DataSet)
  26.  
  27.     Dim DataTable As DataTable = New DataTable 'DataTable
  28.  
  29.     DataTable = DataSet.Tables(0) 'filling the datatable here
  30.  
  31.     Report.Load(Application.StartupPath & "/CrystalReport1.rpt") 'Report Name Here
  32.     Report.SetDataSource(DataTable)
  33.     CrystalReportViewer1.ReportSource = Report
  34.  
  35.   End Sub
  36. End Class