0
votes

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 page 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. }

1
please give a heed to my problem too, it's been so long i am seeing to resolve my problem but i am not finding a proper solutions..please help with this.NoviceToDotNet

1 Answers

0
votes

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.