General information
Category:
Third party products
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
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