执行“iwy2vpzo52pmp555ftfn4455”找不到(rsExecutionNotFound)

发布于 2024-08-17 09:55:57 字数 127 浏览 4 评论 0 原文

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

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

它们在早上运行良好。 有什么建议吗?

谢谢

Some users get the following error when running reports.

• Execution 'iwy2vpzo52pmp555ftfn4455' cannot be found (rsExecutionNotFound)

They run fine in the morning.
Any suggestions?

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

穿越时光隧道 2024-08-24 09:55:57

我可以帮忙。

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

因此,在浏览报表之前,应该尝试清除这些报表的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++;
}

I can help.

The problem is that the ReportViewer control uses Session to store the currently executing report. Once you navigate away from the reports, the item still remains and eventually loses its "execution context", which is the way Report Server caches reports.

Therefore, before browsing a report, you should attempt to clear out the Session of these reports, so that there are NO cached reports in the Session, and the ReportViewer control can work properly.

You will also find that sometimes when accessing Session.Keys.Count, this error can occur, as again, the execution context has failed.

Make sure you do this on the page showing the report!!

The 2 options are:

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();
}

Or

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++;
}
你丑哭了我 2024-08-24 09:55:57

我正在使用 SSRS 2017,并且在尝试使用 URL 访问将报告加载到我的 MVC 项目时遇到了此问题。对我来说,问题与会话有关。

要亲自检查这一点,您可以尝试删除 RSExecutionSession cookie 并重新加载报告。不幸的是,这只是暂时的修复。

如果此方法有效,请尝试将 rs:ClearSession=true 添加到您的查询字符串中。
您可以阅读有关此设置的信息 此处

I am using SSRS 2017 and was running into this issue when trying to load a report into my MVC project using URL Access. The issue for me had to do with session.

To check this for yourself, you can try deleting the RSExecutionSession cookie and reload your report. Unfortunately, this is only a temporarily fix.

If this does work, try adding rs:ClearSession=true to your query string.
You can read about this setting here.

慈悲佛祖 2024-08-24 09:55:57

在报表路径上查找尾随空格。这就是我的原因。

Look for a trailing space on the report path. This was the cause for me.

丑疤怪 2024-08-24 09:55:57

web.config 的模拟中,使用身份

impersonate="true" 
userName="xxxxx" 
password="xxxxx"  

而不是: !--

希望有帮助

On the web.config's impersonation, use identity

impersonate="true" 
userName="xxxxx" 
password="xxxxx"  

instead of : !--<identity impersonate="true"

Hope it helps

森末i 2024-08-24 09:55:57

如果您运行的是 SQL Server Express 版本,则 SQL Server 代理不会运行来清理旧的 SSRS 会话。您需要在 SSRS 数据库上运行作业来清理旧会话。

我的报告运行时间为 10 秒,导出时间为 2 秒 - 所以这与会话过期长度无关。

在导出报告一小时后,将报告导出为 Excel 到我的应用程序中时,我会收到错误消息。

If you're running SQL Server Express edition, the SQL Server Agent isn't running to clean up your old SSRS sessions. You'll need to run a job on SSRS DB to clean up the old sessions.

My report took 10 seconds to run and 2 seconds to export - so it wasn't to do with the session expiry length.

I'd get the error when exporting a report to excel into my app an hour after I exported the report.

以酷 2024-08-24 09:55:57

此错误导致我的应用程序显示运行时错误。

我将其添加到 Global.asax 类中以解决该错误。尝试了 Server.Clear 但什么也没得到。 Session.Clear 完全消除了错误。

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    If ex.InnerException IsNot Nothing Then
            If ex.InnerException.ToString.Contains("The report execution") AndAlso
               ex.InnerException.ToString.Contains("rsExecutionNotFound") Then
                Session.Clear()
                Return
            End If
        End If
End Sub

虽然它可能不是100%适用于上述问题,但我还没有找到任何其他解决方案。

This error was causing my application to display a run time error.

I added this to the Global.asax class to resolve the error. Tried Server.Clear but got nothing. Session.Clear got rid of the error completely.

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
    If ex.InnerException IsNot Nothing Then
            If ex.InnerException.ToString.Contains("The report execution") AndAlso
               ex.InnerException.ToString.Contains("rsExecutionNotFound") Then
                Session.Clear()
                Return
            End If
        End If
End Sub

While it may not be 100% applicable to the question above, I haven't been able to find any other resolution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文