I have create crystal report and when click display the code work but nothing is displayed.
I have check the query and it work.
CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
string s1 = System.Web.HttpContext.Current.Server.MapPath("~/Reports/RepIncome.rpt");
CrystalDecisions.CrystalReports.Engine.ReportDocument oReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
oReportDocument.Close();
oReportDocument.Dispose();
GC.Collect();
oReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
oReportDocument.Load(s1);
oReportDocument.SetDatabaseLogon(connection.userID, connection.password, connection.serverName, connection.databaseName);
CrystalReportViewer1.ReportSource = null;
CrystalReportViewer1.ReportSource = oReportDocument;
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
CrystalReportViewer1.Visible = true;