using CrystalDecisions.CrystalReports.Engine;
-----------------------------------------------------------------------------
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(Server.MapPath("rptOne.rpt"));
for (int index = 0; index < rptDoc.Database.Tables.Count; index++)
{
rptDoc.Database.Tables[index].LogOnInfo.ConnectionInfo.ServerName = "BHARATIKUMAR";
rptDoc.Database.Tables[index].LogOnInfo.ConnectionInfo.DatabaseName = "Employee";
rptDoc.Database.Tables[index].LogOnInfo.ConnectionInfo.UserID = "kumar";
rptDoc.Database.Tables[index].LogOnInfo.ConnectionInfo.Password = "kumar";
rptDoc.Database.Tables[index].ApplyLogOnInfo(rptDoc.Database.Tables[index].LogOnInfo);
}
crvOne.ReportSource = rptDoc;
crvOne.DataBind();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment