Hello All,
With Visual Studio 2005, using VB, I have created a simple embeded Crystal report. It only reads one Oracle table.
I can't connect to the database!
Here's the code I'm using.
Within a Windows form, I have a Crystal Reports Viewer (crvAllReports). I'm ODBC.
The form appears (no data of course), and after a couple of minutes, I get the error stating it can't connect to the database.
What am I doing wrong?
Thanks for the help,
Carl
Dim crtableLogoninfos As New TableLogOnInfos()
Dim crtableLogoninfo As New TableLogOnInfo()
Dim crConnectionInfo As New ConnectionInfo()
Dim CrTables As Tables
Dim CrTable As Table
With crConnectionInfo
.ServerName =
"GoodName"
.UserID =
"Correct ID"
.Password =
"Correct Password"
End With
Dim sReport As New rptTest_2
CrTables = sReport.Database.Tables
'Loop through each table in the report and apply the
'LogonInfo information
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
crvAllReports.ReportSource = sReport