View Single Post
  #2 (permalink)  
Old February 14th, 2005, 08:48 AM
vasanti vasanti is offline
Registered User
 
Join Date: Feb 2005
Location: , , India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try This :

Database crDatabase;
Tables crTables;
TableLogOnInfo crTableLogOnInfo;
ConnectionInfo crConnectionInfo;

crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName= ServerName;
crConnectionInfo.DatabaseName = DatabaseName
crConnectionInfo.UserID = UserName;
crConnectionInfo.Password = Password;

crDatabase = CRObject.Database;
crTables = crDatabase.Tables;

foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{
    crTableLogOnInfo = crTable.LogOnInfo;
    crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
    crTable.ApplyLogOnInfo(crTableLogOnInfo);
}

-vasanti

Reply With Quote