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