Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal with SQL
Message
De
19/11/2001 12:05:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Crystal with SQL
Divers
Thread ID:
00583545
Message ID:
00583545
Vues:
61
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
Fil
Voir

Click here to load this message in the networking platform