pepsisc
August 8th, 2005, 08:33 PM
VB 6, CR XI
Dim dbTable As CRAXDDRT.DatabaseTable
Set dbTable = craxreport.Database.Tables(1)
craxreport.DiscardSavedData
dbTable.Location = App.Path & "\BOM.mdb"
CrystalActiveXReportViewer1.Refresh
Call CrystalActiveXReportViewer1_RefreshButtonClicked(True)
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
The above code is part of the technique I use to call CR from my VB 6 application. Via the app's install routine, the user can load the application in any directory but the database MUST be in the same directory.
Please note this statement: dbTable.Location = App.Path & "\BOM.mdb" My question is: Is this statement suppose to over-ride the Database DataSource set in the design of the report? If so, it doesn't seem to be working. Can you tell me how to fix the problem?
Thanks
Dim dbTable As CRAXDDRT.DatabaseTable
Set dbTable = craxreport.Database.Tables(1)
craxreport.DiscardSavedData
dbTable.Location = App.Path & "\BOM.mdb"
CrystalActiveXReportViewer1.Refresh
Call CrystalActiveXReportViewer1_RefreshButtonClicked(True)
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
The above code is part of the technique I use to call CR from my VB 6 application. Via the app's install routine, the user can load the application in any directory but the database MUST be in the same directory.
Please note this statement: dbTable.Location = App.Path & "\BOM.mdb" My question is: Is this statement suppose to over-ride the Database DataSource set in the design of the report? If so, it doesn't seem to be working. Can you tell me how to fix the problem?
Thanks