crystal report
When running my Crystal Report from my app, I had an issue with a login screen poping up before my report would open. I used this code to solve the problem:
visual basic code:--------------------------------------------------------------------------------
'get userid/password to access DB
Dim tbl As CrystalDecisions.CrystalReports.Engine.Table
For Each tbl In rpt.Database.Tables
Dim tbllogin As New CrystalDecisions.Shared.TableLogOnInfo()
tbllogin.ConnectionInfo.UserID = LogonInfo.Mx_Logon
tbllogin.ConnectionInfo.Password = LogonInfo.Mx_Password
tbl.ApplyLogOnInfo(tbllogin)
Next
--------------------------------------------------------------------------------
but this only solved the problem in XP. NT still askes for a login screen. I noticed that when I use only one table in my report, it opens fine, but when there are multiple tables, I get the login screen in NT...any suggestions?
|