I am using VB.NET to dynamically set the location of the database table for a Crystal report. The following code does what I need, but everytime the report loads, a server logon screen pops up, I click FINISH and the report is displayed. I would like to know if there is a way around that login screen?
Dim logOnInfo As New TableLogOnInfo()
logOnInfo = crpt.Database.Tables.Item
("tblMostPopular".LogOnInfo
'Set the connection information for the table in the report.
logOnInfo.ConnectionInfo.ServerName = GetDBPath() & "EmailReporting.mdb"
logOnInfo.ConnectionInfo.DatabaseName = "EmailReporting.mdb"
logOnInfo.ConnectionInfo.UserID = "Admin"
logOnInfo.ConnectionInfo.Password = ""
logOnInfo.TableName = "tblMostPopular"
logoninfo.ReportName = "MostPopular.rpt"
crpt.Database.Tables.Item("tblMostPopular".ApplyLogOnInfo(logoninfo)
Dim logOnInfo As New TableLogOnInfo()
logOnInfo = crpt.Database.Tables.Item
("tblMostPopular".LogOnInfo
'Set the connection information for the table in the report.
logOnInfo.ConnectionInfo.ServerName = GetDBPath() & "EmailReporting.mdb"
logOnInfo.ConnectionInfo.DatabaseName = "EmailReporting.mdb"
logOnInfo.ConnectionInfo.UserID = "Admin"
logOnInfo.ConnectionInfo.Password = ""
logOnInfo.TableName = "tblMostPopular"
logoninfo.ReportName = "MostPopular.rpt"
crpt.Database.Tables.Item("tblMostPopular".ApplyLogOnInfo(logoninfo)