the problem is that, the rpt file is referring to the mdb file using an absolute path. so, when i open the project on another computer/different location, it couldn't file the .mdb file.
i've encoutered this problem in .NET where we can set the location of the mdb file programmatically using the ConnectionInfo class of CrystalDecisions.Shared.
is there a similar code that can be done from vb 6?
this is my current code in vb 6 to open and show the report.
Expand|Select|Wrap|Line Numbers
- Dim rpt As New CRAXDRT.Application
- Dim CRreport As New CRAXDRT.report
- 'refresh data diCR
- Set CRreport = rpt.OpenReport(App.Path & "\lappenjualan.rpt", 1)
- CRreport.ReadRecords
- CRreport.DiscardSavedData
- report.ReportSource = CRreport
- report.ViewReport
Thank you.