Execution 'iwy2vpzo52pmp555ftfn4455' cannot be found (rsExecutionNotFound)
Asked Answered
E

6

7

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

Epiphragm answered 12/1, 2010 at 16:43 Comment(2)
Run them in the morning?June
I've encountered this bug while trying to use StateServer for sessions. It gets an error while attempting to deserialize the session data.Ptosis
R
5

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++;
}
Roister answered 20/9, 2010 at 15:55 Comment(2)
Note this is a "bug" in SSRS 2005. Apparently the caching mechanism has changed in 2008. I filed a bug with MS over the phone and said that the issue had been passed to the product team (Sept/Oct 2010)Roister
You might be able to accomplish the same if you call ReportViewer.Reset() inside the if(!IsPostBack) block of your webform code behind, before you set params and call the ServerReport.Refresh() method.Presser
S
4

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.

Safekeeping answered 14/11, 2017 at 13:33 Comment(1)
rs:ClearSession=true did it for me, thanks - I was scratching my head for an hour!Adelladella
U
2

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

Unscreened answered 7/3, 2015 at 14:44 Comment(1)
Trailing Space was my issue. Tried the Viewer Reset, and setting a Timeout, but the space was the issue. I could oddly get the parameters and things almost worked, but trimming the space was requiredPox
L
0

On the web.config's impersonation, use identity

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

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

Hope it helps

Lithoid answered 7/2, 2013 at 5:41 Comment(0)
P
0

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.

Purloin answered 26/10, 2016 at 23:38 Comment(0)
P
0

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.

Purloin answered 6/11, 2016 at 5:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.