This is the code of Crystal Report:
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(Server.MapPath(ReportName + ".rpt"));
reportDocument.SetParameterValue("@userid", Convert.ToInt64(5));
reportDocument.SetParameterValue("@Reportname", ReportName);
reportDocument.SetParameterValue("@SessionId", Session.SessionID.ToString());
CrystalReportViewer1.ReportSource = reportDocument;
reportDocument.SetDatabaseLogon("sa", "Password1", "192.168.0.245", "databaseName", true);
It is saying "Unable to connect: incorrect log on parameters." although the login information is correct.
If I set the value to "reportDocument.SetDatabaseLogon("sa", "Password1", "192.168.0.240", "databaseName", true);" it is working fine which is the login information was given during the designing the Crystal Report.