Information générale
Catégorie:
Crystal Reports
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement