for (int i = 0; i < reportDocument.DataSourceConnections.Count; i++)
{
reportDocument.DataSourceConnections[i].SetConnection(Utility._serdb, Utility._db, Utility._user, Utility._pwd);
reportDocument.DataSourceConnections[i].SetLogon(Utility._user, Utility._pwd);
}
for (int i = 0; i < reportDocument.Subreports.Count; i++)
{
for (int x = 0; x < reportDocument.Subreports[i].DataSourceConnections.Count; i++)
{
reportDocument.OpenSubreport(reportDocument.Subreports[i].Name).DataSourceConnections[x].SetConnection(Utility._serdb, Utility._db, Utility._user, Utility._pwd);
}
}