Crystal Reports for Visual Studio 2013 ( ASP.NET Web Form ) – CrystalReportViewer Navigation Button not working
Report.aspx |
… … <CR:CrystalReportViewer ID="SoccerReportViewer" runat="server" AutoDataBind="true" /> … … |
Report.aspx.cs |
using CrystalDecisions.CrystalReports.Engine; using System.Data; using System.Data.SqlClient; protected void Page_Init(object sender, EventArgs e) { ReportDocument rd; if (!Page.IsPostBack) { rd = new ReportDocument(); rd.Load(Server.MapPath(@"~\Report\Player.rpt")); rd.SetDataSource(this.getDataTable()); Session["ReportDocument"] = rd; } else { rd = (ReportDocument)Session["ReportDocument"]; } this.SoccerReportViewer.ReportSource = rd; } private DataTable getDataTable() { … … } |