Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal Reports - SQL
Message
De
16/11/2001 18:58:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Crystal Reports - SQL
Divers
Thread ID:
00583036
Message ID:
00583036
Vues:
57
Having trouble with running my Crystal report that connects to SQL.

I can preview the report in Crystal, so I know the report works and the connection is good while in crystal. When I save the report and try to automate it from Fox, there is a connection error.

Connection error ( OLE ldispatch exception code 20599 cannot open SQL server )

The code -

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

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.)

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

I am guessing that I need to add the password and/or userid throught the cry obj, that is likley the issue. Im just not sure how. Any ideas how.

Thanks - Evan ( elambson@contacts.com )
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform