Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using OLE DB with Crystal Reports 9
Message
From
27/11/2002 15:48:39
Fabian Valencia
Calamos Asset Managment Inc.
Naperville, Illinois, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Using OLE DB with Crystal Reports 9
Miscellaneous
Thread ID:
00727754
Message ID:
00727754
Views:
90
I have a Crystal report version 9 connected to a local table. The properties for the table are:

Database type: OLE DB (ADO)
Provider: VFPOLEDB
Data Source: c:\temp

The user id and password are both blank. I am not using a DSN. The report is ok in Crystal. The table connects without a problem.

I then attempt to run the report by instanciating an instance of the crystal object, setting the location of the table, then exporting the report.

* Open the CR engine
oEngineObject = CREATEOBJECT("CrystalRuntime.application.9")

* Open the report
oReport=oEngineobject.openreport("Reportname.rpt")

* Set the location of the table
oReport.Database.Tables.item[1].location = "full path of table"

* Export the report to a file
oReport.ExportOptions.DestinationType = 1

* Set the format
oReport.ExportOptions.FormatType = 1

* Set up disk file name
oReport.ExportOptions.DiskFileName = "File name for export"

* Export
oReport.Export(.f.)

The logic has always worked fine when working with Fox 2.x tables. Now, I am getting this error when executing the export method:

Exception Code 0 from the CR ActiveX Designer: Logon failed.
Details: ADO Error Code: 0x800300fb
Source: MS OLE DB Service Components
Description: The file is not a valid compound file...

I did notice that the data source in Crystal does read: OLE DB (ADO). Unlike in 8.5 OLE DB - without the (ADO). Is Crystal 9 going to enforce an ADO connection to be made from my VFP code?

Any ideas?
Next
Reply
Map
View

Click here to load this message in the networking platform