How to set the database file (MS. Access db) for a rpt file (Crystal report) programmaticall y in vb6?
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 programmaticall y using the ConnectionInfo class of CrystalDecision s.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.
Thank you.
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 programmaticall y using the ConnectionInfo class of CrystalDecision s.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.
Code:
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.
Comment