水晶报告问题

时间:2010-07-15 12:12:54

标签: asp.net

在按钮上选择了索引更改我生成了一个报告,报告的第一页显示正确,结果正确但当我导航到第二页水晶报告消失的原因请告诉我

  

受保护的虚空   studentList_SelectedIndexChanged(对象   发件人,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 =   报告;           // studentResumeCrViwer。       }

1 个答案:

答案 0 :(得分:0)

您是否在同一页面上有报告查看器?我遇到了一个类似的问题,我在page_load中进行了报告绑定,点击了页面导航,页面重新加载,导致导航失败。将绑定移动到page_init解决了这个问题。在这里,我看到页面被重新加载,观众也会消失。