lifeforest
Programmer
Further to my other question here, the code has error when run to myTable.Location code.
myTables = myReportDocument.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
With myTableLogonInfo.ConnectionInfo
.ServerName = myConnectionInfo.ServerName
.DatabaseName = myConnectionInfo.DatabaseName
.UserID = myConnectionInfo.UserID
.IntegratedSecurity = myConnectionInfo.IntegratedSecurity
.Password = myConnectionInfo.Password
End With
myTable.ApplyLogOnInfo(myTableLogonInfo)
myTable.Location = myConnectionInfo.DatabaseName & "." & QualifiedName(1) & "." & myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1)
The thing is when i run from CR2008 everything looks fine.
Any ideas guys? Thanks for any help!!!
myTables = myReportDocument.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
With myTableLogonInfo.ConnectionInfo
.ServerName = myConnectionInfo.ServerName
.DatabaseName = myConnectionInfo.DatabaseName
.UserID = myConnectionInfo.UserID
.IntegratedSecurity = myConnectionInfo.IntegratedSecurity
.Password = myConnectionInfo.Password
End With
myTable.ApplyLogOnInfo(myTableLogonInfo)
myTable.Location = myConnectionInfo.DatabaseName & "." & QualifiedName(1) & "." & myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1)
The thing is when i run from CR2008 everything looks fine.
Any ideas guys? Thanks for any help!!!