Thnx all for your help.....
Guess i solved the problem. There was already the block of code which iterates through the tables in the CrystalDecisions.CrystalReports.Engine and gives each one of them the Connection info.
Through trial and error method I by passed the block of code and it worked in my case. Below is the code which i commented:
/********Code Block********************************/
repTbls = reportDocument.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table repTbl in repTbls)
{
repTblLogonInfo = repTbl.LogOnInfo;
repTblLogonInfo.ConnectionInfo = connectionInfo;
repTbl.ApplyLogOnInfo(repTblLogonInfo);
}
reportDocument.SetDatabaseLogon(connectionInfo.UserID,connectionInfo.Password,connectionInfo.ServerName,null);
/******************************************************/