General information
Category:
Reports & Report designer
Title:
Crystal Reports Change Location of Database
I'm trying to use the OCX for Crystal Reports through Foxpro and I can get it to run with the stored data in the report. I am trying to change the location of the report to point at another spot. It doesn't change the report.
The report is a simple list, the database is exactly the same but I am changing it to look at another directory.
crystalapplication = CreateObject("Crystal.CRPE.Application")
crystalReport = crystalApplication.OpenReport("C:\PFSAR\LOGIN.RPT")
**The Following line I change the source from c:\pfsar to o:\pfsar
crystalReport.Database.Tables.item(1).location="o:\pfsar\login.dbf"
**
crystalReport.ExportOptions.FormatType = 3
crystalReport.ExportOptions.DiskFileName = "c:\pfsar\test.txt"
crystalReport.ExportOptions.DestinationType = 1
crystalReport.Export(.t.)
Thanks in advance.
Any ideas?
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