-
I am using the crystal reports control and have this code. But I cannot seem to get connected to the other server. Anyone got any ideas?
Private Sub cmdSQL1_Click()
With Crystal
.Reset
.WindowState = crptMaximized
.ReportSource = crptReport
.ReportFileName = "C:\windows\desktop\report1.rpt"
.LogOnServer "p2ssql.dll", "rna_sql_1", "lptables", "rnasa", "rnasa"
.Connect = "DRIVER=SQL Server;SERVER=RNA_SQL_1;UID=userID;PWD=Password;WSID=TESTWEB;DATABASE=lptables"
.WindowTitle = "Test Connection"
.Action = 1
End With
End Sub
Private Sub cmdSQL2_Click()
With Crystal
.Reset
.WindowState = crptMaximized
.ReportFileName = "C:\windows\desktop\report1.rpt"
.WindowTitle = "Test Connection"
.Connect = "DRIVER=SQL Server;SERVER=RNA_SQL_2;UID=userID;PWD=Password;WSID=TESTWEB;DATABASE=lptables"
.Action = 1
End With
End Sub
-
I have problems with Crystal Reports and connecting to SQL Server also. I ended up finding some settings in the report itself that fixed the problem. You might want to take a look at the report. Sorry I am not very specific I am too familiar with crystal reports I just had the job of debugging the problem.