-
Report cannot closed
Hi Gurus
I am using Crystal Report 8.5 & VB 6.
I use LogOnserver method to connect to SQL Server 2000
CRViewer is placed on a form.
I need to disconnect connection created by the report when I am Unloading the form.
I try to use LogOffServer method, It does not work, and givin an error.
Code I use is as follows
Code:
crApp.LogOnServer "PDSSQL.DLL", SERVERNAME, REPORT_DB, USERNAME, PASSWORD
Set rpt = crApp.OpenReport(sFileName)
If IsTempDB Then
rpt.Database.Tables(1).LOCATION = sTableName
End If
SetParameterValues
crv.ReportSource = rpt
crv.ViewReport
crv.Zoom 1 'Fit width to the screen
Me.Show
'When Form Unloading
Set rpt = Nothing
crApp.LogOffServer "PDSSQL.DLL", SERVERNAME, REPORT_DB, USERNAME, PASSWORD
Set crApp = Nothing
Is there any one who knows about this problem.
Or Is there any solution?
Thank u for helping in Advance
--
web : http://www.freewebs.com/dineshns