crystal report problem
On buttons selected index change i have generated a report, report's first page it displayed proper with correct result but when i navigate to second p开发者_如何学Goage crystal report disappears what is the reason please let me know
protected void studentList_SelectedIndexChanged(object sender, EventArgs e) { int studentId = Convert.ToInt32(studentList.SelectedValue); ReportDocument report = new ReportDocument(); report.Load(Server.MapPath("StudentResume.rpt")); DataTable tbl_students; tbl_students = resumeManager.GetStudentListForCrystalRpt(studentId); report.SetDataSource(tbl_students); studentResumeCrViwer.ReportSource = report; // studentResumeCrViwer. }
Do you have the report viewer on the same page? I got a similar issue where I did the report binding in the page_load and on click of the page navigation, the page reloads forcing the navigation to fail. Moving the binding to the page_init solved the issue. Here also, I see that the page is reloaded and the viewer goes away.
精彩评论