What am I doing wrong?
I used CR 8.5 to create a report. I used the data explorer to connect to an Access database (.mdb) via the Database Files option in Data Explorer. Within CR the report works fine. I then saved it as medical.rpt
In VB 6, I used the following code if the frmReports form
Public GenReport as CRAXDRT.report
Private Sub cmdPrint_Click()
Dim GenReportApp as new CRAXDRT.Application
Dim crxDataBaseTable as CRAXDRT.DatabaseTable
Set GenReport = GenReportApp.Openreport (App.path & "\medical.rpt"
GenReport.DiscardSavedData
'Latest addition
For Each crxDataBaseTable in GenReport.DataBase.Tables
crxDatabaseTable.Location = App.path & "\employees.mdb"
Next crxDatabaseTable
set frmMainReports.JRReport= GenReport (in frmMainReports which contains viewer I have Public JRREport As Report)
This all works fine in VB- ie before I compile it and install on another workstation, and it worked before I added the code commented as 'Latest addition'.
For some reason when I compile it and install on another workstation - the complete VB program works perfectly except when I try to Print this report I get a
"Physical database not found" error.
Can someone please help me sort this out.
I used CR 8.5 to create a report. I used the data explorer to connect to an Access database (.mdb) via the Database Files option in Data Explorer. Within CR the report works fine. I then saved it as medical.rpt
In VB 6, I used the following code if the frmReports form
Public GenReport as CRAXDRT.report
Private Sub cmdPrint_Click()
Dim GenReportApp as new CRAXDRT.Application
Dim crxDataBaseTable as CRAXDRT.DatabaseTable
Set GenReport = GenReportApp.Openreport (App.path & "\medical.rpt"
GenReport.DiscardSavedData
'Latest addition
For Each crxDataBaseTable in GenReport.DataBase.Tables
crxDatabaseTable.Location = App.path & "\employees.mdb"
Next crxDatabaseTable
set frmMainReports.JRReport= GenReport (in frmMainReports which contains viewer I have Public JRREport As Report)
This all works fine in VB- ie before I compile it and install on another workstation, and it worked before I added the code commented as 'Latest addition'.
For some reason when I compile it and install on another workstation - the complete VB program works perfectly except when I try to Print this report I get a
"Physical database not found" error.
Can someone please help me sort this out.