reporting-services - 找不到执行 'iwy2vpzo52pmp555ftfn4455' (rsExecutionNotFound)

标签 reporting-services reportingservices-2005

一些用户在运行报告时收到以下错误。

• 找不到执行 'iwy2vpzo52pmp555ftfn4455' (rsExecutionNotFound)

他们早上跑得很好。
有什么建议?

谢谢

最佳答案

我可以搭 Handlebars 。

问题在于 ReportViewer 控件使用 Session 来存储当前正在执行的报表。一旦您离开报告,该项目仍然保留并最终失去其“执行上下文”,这是 Report Server 缓存报告的方式。

因此,在浏览报表之前,应该尝试清除这些报表的Session,这样Session中就没有缓存的报表,ReportViewer控件才能正常工作。

你还会发现,有时在访问Session.Keys.Count的时候,会出现这个错误,同样是执行上下文失败了。

确保在显示报告的页面上执行此操作!!

2个选项是:

if (!IsPostBack)
{
    HttpContext.Current.Session.Clear();
    ReportViewer1.ServerReport.ReportServerUrl = new Uri(ReportServerUrl, System.UriKind.Absolute);
    ReportViewer1.ServerReport.ReportPath = ReportPath;
    System.Collections.Generic.List<ReportParameter> parameters = new System.Collections.Generic.List<ReportParameter>();
    ....

    ReportViewer1.ServerReport.SetParameters(parameters);
    ReportViewer1.ServerReport.Refresh();
}

或者
for (int i = 0; i < HttpContext.Current.Session.Keys.Count; )
{
   if (HttpContext.Current.Session[i].ToString() == "Microsoft.Reporting.WebForms.ReportHierarchy")
       HttpContext.Current.Session.RemoveAt(i);
   else
      i++;
}

关于reporting-services - 找不到执行 'iwy2vpzo52pmp555ftfn4455' (rsExecutionNotFound),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2050593/

相关文章:

sql-server - SSRS : Passing/Setting parameter to Dataset using Expression

c# - SQL 报告服务 - 以编程方式设置数据源?

reportingservices-2005 - SSRS 多值空白

reporting-services - 评估 SSRS 中两列的 iif 语句

c# - SSRS Web 服务 LoadReport() 异常被抛出

reporting-services - SSRS 使用表达式将颜色属性设置为 ARGB 值

reporting-services - SSRS 2008 的表值参数

sql - 如何使 ssrs 矩阵中的列不可见

date - 报告生成器3.0 : How to convert string representation of dates in mm/dd/yy format using CDate

migration - 如何升级 SSRS 2005 报告项目以与现代 SSRS 版本一起使用?