Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal Reports - Stored Procedure
Message
From
23/01/2002 14:59:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Crystal Reports - Stored Procedure
Miscellaneous
Thread ID:
00609270
Message ID:
00609270
Views:
75
I have a report (actuall a group of reports) that are calling a SQL Server Stored Procedrue to get the data for the report. The reports were created by someone else, on a different server with a different database name. I have the exact same database, but it is a different name.

If I open the report in crystal reports and change the 'Location' settings to point to my server and database, the report will preview without problems.

However, if I try to do the same thing in code, it does not work. Maybe I am missing something. Here is the code:
o=CREATEOBJECT('crystal.crpe.application')
o.LogOnServer('pdssql.dll','DJ-LAPTOP', 'DEMO', '***', '***')
r=o.OpenReport('reports\registration.rpt')
r.Database.tables(1).setlogoninfo('DJ-LAPTOP', 'DEMO', '***', '***')
r.Database.tables(1).location = 'demo.dbo.proc(cusCRIGetRegistrationForm)'
r.Database.Verify()
r.Preview()
The error I get is on the Preview() method. The message says:

"OLE IDispatch exception code 20534 from cpeaut32: Error detected by database DLL..."

Has anybody done anything like this before? What am I missing?
Thanks,
Dan Jurden
djurden@outlook.com
Reply
Map
View

Click here to load this message in the networking platform