Information générale
Catégorie:
Produits tierce partie
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)
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement