Thanks that solved the Tables issue. However when previewing the report using
Code:
CrystalReportViewer.ReportSource = crxReport
I get the error “Invalid Report Source”. I changed the report source to
Code:
CrystalReportViewer.ReportSource = ReportName
and I get the report but the database will not change. I can change the report source by supplying the entire path and “reportname.rpt”. But will not change the database.

Any suggestions

Thanks Chuck


Code:
Dim crxApp As New CRAXDDRT.Application()
        Dim crxReport As CRAXDDRT.Report
        Dim ReportName As String
        Dim crxDatabaseTable As CRAXDDRT.DatabaseTable
        Dim crxDatabaseTables As CRAXDDRT.DatabaseTables

        crxApp = CreateObject("crystalruntime.application.11")


        ReportName = System.Windows.Forms.Application.StartupPath & "\" & Frm1.CBReports.SelectedValue
        crxReport = crxApp.OpenReport(ReportName)

        crxDatabaseTables = crxReport.Database.Tables

        For Each crxDatabaseTable In crxDatabaseTables
            crxDatabaseTable.Location = System.Windows.Forms.Application.StartupPath & "\" & Frm1.FileText
        Next crxDatabaseTable

        CrystalReportViewer.ReportSource = crxReport