cossy74
asked on
Database Logon Information and C#
Hi,
i have this code that sets the logon information:
crConnection.ServerName = g_DSN;
crConnection.DatabaseName = g_Computer;
crConnection.UserID = g_UID;
crConnection.Password = g_PWD;
TableLogOnInfo logonInfo = new TableLogOnInfo();
foreach (CrystalDecisions.CrystalR eports.Eng ine.Table crTable in oRpt.Database.Tables)
{
logonInfo = crTable.LogOnInfo;
logonInfo.ConnectionInfo = crConnection;
crTable.ApplyLogOnInfo(log onInfo);
}
crv_Viewer.ReportSource = oRpt;
My problem is that i am still getting the Popup for the database information...
Could someone help
i have this code that sets the logon information:
crConnection.ServerName = g_DSN;
crConnection.DatabaseName = g_Computer;
crConnection.UserID = g_UID;
crConnection.Password = g_PWD;
TableLogOnInfo logonInfo = new TableLogOnInfo();
foreach (CrystalDecisions.CrystalR
{
logonInfo = crTable.LogOnInfo;
logonInfo.ConnectionInfo = crConnection;
crTable.ApplyLogOnInfo(log
}
crv_Viewer.ReportSource = oRpt;
My problem is that i am still getting the Popup for the database information...
Could someone help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
kolpdc: changed your code to
TableLogOnInfos crTableLogOnInfos = new TableLogOnInfos();
so that the variable is assigned.
It now works...
thanks
TableLogOnInfos crTableLogOnInfos = new TableLogOnInfos();
so that the variable is assigned.
It now works...
thanks
;) yes - of course. sorry. but it gave a clue. glad i could help.
ASKER