Discussion Locked

Error 20599 Cannot open SQL Server

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am using Crystal Reports 8.5 and calling it from VB using the Crystal reports OCX.

In Crystal Reports,If I check 'Save Data With Report',then it is working fine from VB.

But the report is not refreshed with latest data.

And If I Uncheck 'Save Data With Report' from Crystal reports and call it from VB then it is giving error like
----------------------
Run-time error '20599'
Cannot Open Sql Server
-----------------------
The report is working fine in Crystal Report Environment.

Can you please help me out ,its very urgent.

With Best Regards

Vijay.

2 replies

by prasongso

When You call from VB you have to code : Example
with crystalReport1
.reportFileName = "c:\crystal1.rpt"
.discardsaveddata = true
'if you have filter for selection formula
.Selectionformula = "{Field1.Name}='" & strField &"'"
.action = 1
end with

This discussion is closed to new replies.