I develope a web application under Win XP using C# (VS .NET 2003). The Crystal Report template data source is set OLE DB provider. I use MSDE 2000 (SP3). I make the application setup program using the Web Setup Project. The application work fine under Win XP, but the "logon failed" error arises under Win 2000 Proffesional and under Win 2000 Server. What is wrong?
Here is code:
ReportDocument crReport =
new ReportDocument();string sTemplatePath = Server.MapPath(Request.ApplicationPath + "/" + m_sReportTemplate);
crReport.Load(@sTemplatePath);
TableLogOnInfo crTableLogOnInfo =
new TableLogOnInfo();
ConnectionInfo tConnInfo =
new ConnectionInfo();
tConnInfo.ServerName = "ServerName";
tConnInfo.DatabaseName = "DatabaseName";
tConnInfo.UserID = "UserId";
tConnInfo.Password = "Password";
foreach(CrystalDecisions.CrystalReports.Engine.Table crTable in crReport.Database.Tables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = tConnInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
CrystalReportViewer1.ReportSource = crReport;
CrystalReportViewer1.DataBind();