Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal with SQL
Message
From
19/11/2001 12:05:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Crystal with SQL
Miscellaneous
Thread ID:
00583545
Message ID:
00583545
Views:
60
Trying to get Crystal to work with our SQL data. I can run the report in crystal and all is well. When I try to run the report by automation from VFP I get a SQL data access error. I think I need to be passing the uname / password to the CR object?

Here is the code...


***********************************

local loCrystal as 'crystal.CRPE.Application'

loCrystal = CREATEOBJECT('crystal.CRPE.Application')
loCrReport = loCrystal.OpenReport('M:\Lambson\SQLCrystal\Example1\SQLLens.rpt')

loCrDatabase = loCrReport.Database()
loCrExportOptions = loCrReport.ExportOptions()
*loCrDatabase.PassWord('BELBLUE')

loCrExportOptions.DestinationType = 1 && file format
loCrExportOptions.FormatType = 4 && rtf format

loCrExportOptions.DiskFilename = 'M:\Lambson\SQLCrystal\Example1\Test.rtf'
loCrReport.DiscardSavedData()
loCrReport.ParameterPromptingEnabled = .F.

loCrReport.Export(.F.)

loCrReport = .NULL.
loCrDatabase = .NULL.
loCrExportOptions = .NULL.
loCrystal = .NULL.

*********************************



Thanks for any help.

Evan Lambson (elambson@contacts.com)
Reply
Map
View

Click here to load this message in the networking platform