General information
Title:
Not able to change data location
I am using Crystal Reports 9.0 and am trying to change the data location. I have a table called status.dbf in the c:\data1 directory and want to change it to run from c:\data2 directory. Here is the code I am using:
LOCAL oCR as CRAXDRT.Application
LOCAL oRpt as CRAXDRT.Report
LOCAL oDB as CRAXDRT.Database
LOCAL ocDBT as CRAXDRT.DatabaseTables
LOCAL oDBT as CRAXDRT.DatabaseTable
oCR = CREATEOBJECT("CrystalRuntime.application")
oRpt = oCr.OpenReport("C:\Cradv90\Docs\status.rpt")
oDB = oRpt.Database()
ocDBT = oDB.Tables()
oDBT = ocDBT.Item(1)
* Set the location
oDBT.Location = "c:\data2\status.dbf"
oRpt.PrintOut()
I have data in the table but my report comes out with only a heading and no records. Also, if I debug it and look at oDBT.Location after it is changed, it changes to "STATUS.DBF". Why is it not showing me the path?
Tim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only