hi Try this piece of code!
ReportDocument rptDoc = new ReportDocument();
TableLogOnInfo tblLogInf = new TableLogOnInfo();
rptDoc.Load( <Report Path> );
foreach( Table tbl in rptDoc.Database.Tables )
{
tblLogInf = tbl.LogOnInfo;
tblLogInf.ConnectionInfo.ServerName = <Database Server Name>
tblLogInf.ConnectionInfo.DatabaseName = <Database Name>
tblLogInf.ConnectionInfo.UserID = <User ID>
tblLogInf.ConnectionInfo.Password = < Password>
rptDoc.Database.Tables[tbl.Name].ApplyLogOnInfo(tblLogInf);
rptDoc.Database.Tables[tbl.Name].Location = <Database Name> + .dbo. + tbl.Name;
}
Manoj 'Doing what u like is Freedom, Liking what u do is Happiness'