I have a plain asp.Net page that contains a CrystalReportViewer. I use the following code to in the Page_Load method to display a report:\[code\]ReportDocument report = new ReportDocument(); TableLogOnInfos crtableLogoninfos = new TableLogOnInfos(); TableLogOnInfo crtableLogoninfo = new TableLogOnInfo(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); Tables CrTables; report.Load(Server.MapPath("Reports\\" + Request.Params[0])); crConnectionInfo.ServerName = ConfigurationManager.AppSettings["ReportSQLServer"]; crConnectionInfo.DatabaseName = ConfigurationManager.AppSettings["ReportSQLDatabase"]; crConnectionInfo.UserID = ConfigurationManager.AppSettings["ReportSQLUsername"]; crConnectionInfo.Password = ConfigurationManager.AppSettings["ReportSQLPassword"]; CrTables = report.Database.Tables; foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables) { crtableLogoninfo = CrTable.LogOnInfo; crtableLogoninfo.ConnectionInfo = crConnectionInfo; CrTable.ApplyLogOnInfo(crtableLogoninfo); } Session["Report"] = report; rptViewer.ReportSource = report; rptViewer.RefreshReport();\[/code\]However, no matter what report I load, it displays as follows:
When I use the exact same logic in a WinForms app to populate a CrystalReportsViewer there, the report displays as expected.Please advise as to what I am missing in the asp.net web form to make the report display correctly.