Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports OCX Datafiles

Status
Not open for further replies.

jmcd0719

Programmer
Jun 13, 2001
37
US
I'm trying to use the OCX for Crystal Reports through Foxpro and I can get it to run with the stored data.

The report is a simple list, the database is exactly the same but I am changing it to look at another directory.

However, I can't get the syntax for changing the source database to work correctly. The code from the documentation says to use:

Report.DataFiles(ArrayIndex)[= Location$]

But when I run it, I get an OLE error code 0x80020006: Unknown name


crystalapplication = CreateObject("Crystal.CRPE.Application")

crystalReport = crystalApplication.OpenReport("C:\PFSAR\LOGIN.RPT")

**error on this line
crystalReport.DataFiles(0)="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.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top