Hi -
I have a VB.NET Windows application that is using CrystalReports.NET. I think I've followed all of the BOL examples and discussion group recommendations, but I'm still getting a database login prompt when running a report. Here's my code for the connection info:
Dim crTableLogonInfo As New TableLogOnInfo
Dim crTables As Tables
Dim crTable As Table
crTables = PeopleList.Database.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo.ServerName = strServer
crTableLogonInfo.ConnectionInfo.DatabaseName = strDBPathName
crTableLogonInfo.ConnectionInfo.UserID = strUserID
crTableLogonInfo.ConnectionInfo.Password = strPassword
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next crTable
I've stepped through the code, and all the variables are correct. All of the ConnectionInfo properties are set correctly (and are displayed in the prompt window) except for Password. strPassword is an 8-character string, but ConnectionInfo.Password is an empty string.
When I enter the correct password in the login prompt, the report runs. But, of course, I'd like to get rid of the prompt.
Can anyone see what I'm doing wrong??
Thanks for your help.
- Jeff
I have a VB.NET Windows application that is using CrystalReports.NET. I think I've followed all of the BOL examples and discussion group recommendations, but I'm still getting a database login prompt when running a report. Here's my code for the connection info:
Dim crTableLogonInfo As New TableLogOnInfo
Dim crTables As Tables
Dim crTable As Table
crTables = PeopleList.Database.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo.ServerName = strServer
crTableLogonInfo.ConnectionInfo.DatabaseName = strDBPathName
crTableLogonInfo.ConnectionInfo.UserID = strUserID
crTableLogonInfo.ConnectionInfo.Password = strPassword
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next crTable
I've stepped through the code, and all the variables are correct. All of the ConnectionInfo properties are set correctly (and are displayed in the prompt window) except for Password. strPassword is an 8-character string, but ConnectionInfo.Password is an empty string.
When I enter the correct password in the login prompt, the report runs. But, of course, I'd like to get rid of the prompt.
Can anyone see what I'm doing wrong??
Thanks for your help.
- Jeff