Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports - SQL
Message
From
16/11/2001 18:58:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Crystal Reports - SQL
Miscellaneous
Thread ID:
00583036
Message ID:
00583036
Views:
56
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 )
Next
Reply
Map
View

Click here to load this message in the networking platform