Thanks that solved the Tables issue. However when previewing the report usingI get the error “Invalid Report Source”. I changed the report source toCode:CrystalReportViewer.ReportSource = crxReportand 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.Code:CrystalReportViewer.ReportSource = ReportName
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




Reply With Quote