返回首页


我已创建一个ASP.NET项目,使用#作为后端Ç。在我的项目中,我已经使用水晶报表显示用户的报告。

我喜欢当用户选择1报告,然后水晶报表查看器显示的第一份报告,或选择第二个,然后水晶报表查看器显示的第二份报告。动态报告
而我也已经打开的水晶报表的观众paramterfiledinfo财产传递的参数值,以我的报告。

现在我已经做到了,它会工作的伟大。但我的问题是出现时,我有一个以上的页报告的数据和我去的第二页会显示......类似这样的错误

"没有有效的报告来源是"

请帮我...

回答

评论会员:Tejas_Vaishnav 时间:2012/02/06
FRO解决这个问题,我需要做类似这样的......

一份报告,报告viwer assinig后,我将它添加到会话也显示报告还呼吁本方OnNavigate,OnViewZoom等功能...报表查看器的事件


protected void setReportSource(object sender, EventArgs e)

{

   if (Session["Report"] != null)

   {

       if (Session["Parameter"] != null)

       {

            CRPTViewer.ParameterFieldInfo = (ParameterFields)Session["Parameter"];

       }

       CRPTViewer.ReportSource = (ReportDocument)Session["Report"];

   }

}

评论会员:游客 时间:2012/02/06
greatayman:我想你需要绑定的数据报告,每次报告浏览器页面回发如下:{C}关闭报告每次页面卸载,如下:codeprelang="cs"spanclass="code-keyword"protected/spanspanclass="code-keyword"void/spanPage_UnLoad(spanclass="code-keyword"object/spansender,EventArgse){spanclass="code-keyword"if/span(rpt!=spanclass="code-keyword"null/span){rpt.Close();rpt.Dispose();}}/pre/code的