Hi...
It works a little strange.
From some tests I've done saw that you can't change the name of the datasource tables... So what I'm doing is to add something to the end of each filename.
Say you have a report with 2 tables... my_header, my_detail which are linked with an index on a common field.. eg id. In the datasource location you should have these 2 tables (my_header and my_detail)
************************************************************
cpath="c:\reports\" && a path where you put your tables
rep_add=substr(sys(2015),3)
rep_ext=".dbf"+rep_add
rep_cdx=".cdx"+rep_add
rep_header="my_header"+rep_ext
rep_detail="my_detail"+rep_ext
select my_header && i believe you are doing something like that
copy to (cpath+rep_header) type foxplus as 737 with cdx
select my_detail
copy to (cpath+rep_detail) type foxplus as 737 with cdx
* rename for cdx (IF you have indexes)
rename (cpath+"my_header.cdx") to (cpath+rep_header+rep_add)
rename (cpath+"my_detail.cdx") to (cpath+rep_detail+rep_add)
CRXReport = goCrystl.OpenReport("XXX.rpt") && the name of the report
for each rep in CRXReport.Database.Tables
rep.location=cpath+rep.location+rep_ext
endfor
CRXReport.Database.verify()
**************************************************************
I hope I have helped....
Previous
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