QUOTE(osgen @ 10 Apr, 2008 - 09:14 AM)

Hi,
I get a 'Runtime Error 20599. Cannot open SQL Server' pointing to:
CR1.Action = 1
Database is: MRR_REP01.mdb
Crystal Reports 8.5
Report Filename is: MRR_REP01.rpt
Pls see part of my Code below :
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{0C8DE9F2-EAFC-44DF-A13F-B5A9B36ED780}#2.0#0"; "lvButton.ocx"
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX"
Begin VB.Form frmMatReceiving
BorderStyle = 3 'Fixed Dialog
ClientHeight = 9300
ClientLeft = 45
ClientTop = 45
ClientWidth = 14865
ControlBox = 0 'False.
.
.
.
.
Begin Crystal.CrystalReport CR1
Left = 8880
Top = 7860
_ExtentX = 741
_ExtentY = 741
_Version = 348160
PrintFileLinesPerPage= 60
End
.
.
.
Private Sub lvPrint_Invoice_Click()
'**********************************
Set rsMRR_REP01 = New ADODB.Recordset
rsMRR_REP01.Open "Select * from MRR_REP01", myCn, 1, 2
If rsMRR_REP01.RecordCount = 0 Then
Exit Sub
End If
CR1.Reset
CR1.Destination = 0
CR1.ReportFileName = "c:\ProjCost\rpt\MRR_REP01.rpt"
CR1.DiscardSavedData = True
CR1.WindowState = crptMaximized
CR1.Action = 1
End Sub
Does anyone knows a solution to this? Thanks in advance.
.
Osgen
may be your login credentials to the data source is not correct. how are you connecting to the sql server from your application?
for better performance use a System-DSN connection and apply this on connecting reports also. to resolve your reporting bugs you can
Visit This Linktell me what have you got finally.
regards
Shouvik