Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21192

Crystal Report error --- 20599 Cannot open SQL server.

$
0
0
Environment
Windows7 + Vb6+sqlserver express edition + Crystal Report 8.5

Dear all,

Following is the code by which I am trying to open a crystal report.
Here mdiajmer ais my mdifile and crptfirm = crystal report control on mdifile

Sir, when I try to open the report on the last line
mdiAjmer.crptFirm.Action = 7

I am having error as :
error number - 20599
error description - Cannot open SQL server.

my dsn name is -- chq_sql--- which is working fine in crystal report as I am able to open report in Crystal Report Software.

mdiAjmer.crptFirm.Reset
mdiAjmer.crptFirm.WindowShowCloseBtn = True
mdiAjmer.crptFirm.WindowShowPrintSetupBtn = True
mdiAjmer.crptFirm.connect = "DSN=chq_sql; UID=sa;PWD=saadmin;"
'mdiAjmer.crptFirm.SelectionFormula = sql
mdiAjmer.crptFirm.DataFiles(0) = "banklist"
mdiAjmer.crptFirm.ReportFileName = App.Path & "\reports\banklist.rpt"
mdiAjmer.crptFirm.WindowState = crptMaximized
mdiAjmer.crptFirm.RetrieveDataFiles
mdiAjmer.crptFirm.Action = 7


Pl. guide how can I solve the problem

Viewing all articles
Browse latest Browse all 21192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>