Skip to Content
0
Former Member
Feb 16, 2011 at 06:10 PM

How can I set the "UseDSNProperties" to false for a table logon?

88 Views

I am trying to change the table logon properties through the API.

TableLogOnInfo info = new TableLogOnInfo();
info.ConnectionInfo.AllowCustomConnection = true;
info.ConnectionInfo.ServerName = run.TestDatabaseDsn;
info.ConnectionInfo.DatabaseName = run.DatabaseName;
info.ConnectionInfo.Password = run.TestDatabasePassword;
info.ConnectionInfo.UserID = run.TestDatabaseUser;
info.ConnectionInfo.IntegratedSecurity = false;

...

foreach (CrystalDecisions.CrystalReports.Engine.Table table in doc.Database.Tables)
{
	TableLogOnInfo tableLogOnInfo = table.LogOnInfo;

	tableLogOnInfo.ConnectionInfo = info.ConnectionInfo;
	table.ApplyLogOnInfo(tableLogOnInfo);
}

How can I set the "UseDSNProperties" of the ConnectionInfo.Attributes to "false"?

Thanks.

CR 12.3

.NET 4.0