This is a migrated thread and some comments may be shown as answers.

Running report prevents callbacks

5 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steele
Top achievements
Rank 1
Steele asked on 30 Aug 2011, 07:14 AM
Hi All,
I am using telerik webform report viewer version 5.1.11.713 and the corresponding Reporting dll's.
I am having issues with enabling a user to close down a report and continue using the ajaxified web application.
I use the radwindow to load an aspx page that contains the web viewer.  In the Page_Load event, I assign my report document to it.
Some reports may take a couple of minutes to run, and the user may close the radwindow in order to do another task.  It would be expected that the user not receive the report.
The thing is, if the user clicks a button that uses a callback, that callback waits until the Report has completed.
This is unexpected.
Is this the intent of the Report mechanism?  Elsewhere, if a callback is triggered while another callback is being processed, the new callback takes precedence.
Can you please advise as to what can be done to alleviate this issue?
Thanks,
Steele.

My ReportHolder page :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportHolder.aspx.cs" Inherits="Audit.Audit_Reports.ReportHolder" %>
 
<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=5.1.11.713, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerikrv" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Report Holder</title>
    <style type="text/css">
        html, body, form#form1, div#Content
        {
            margin: 0px;
            padding: 0px;
            height: 100%;
        }
    </style>
</head>
<body >
    <form id="form1" runat="server">
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ReportViewer1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ReportViewer1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
         
            </script>
</telerik:RadCodeBlock>
    <telerik:RadSplitter
            ID="RadSplitter1" runat="server" Height="100%" Width="100%">
            <telerik:RadPane ID="RadPane1" Runat="server" Scrolling="None"
        onclientresized="ResizeViewer">
    <div id="Content">
        <telerikrv:ReportViewer ID="ReportViewer1" runat="server" Height="100%"
            Width="100%" ShowHistoryButtons="False" ShowParametersButton="False">
        </telerikrv:ReportViewer>
    </div>
    </telerik:RadPane>
        </telerik:RadSplitter>
         
     
     
     
    </form>
</body>
</html>

And my code behind :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace Audit.Audit_Reports
{
    public partial class ReportHolder : System.Web.UI.Page
    {
        private Telerik.Reporting.IReportDocument Get_Report(string RepName)
        {
             
            try
            {
                Type t = Type.GetType("Audit.Audit_Reports." + RepName);
                Telerik.Reporting.IReportDocument ret = (Telerik.Reporting.IReportDocument)(Activator.CreateInstance(t));
                foreach (string QRKey in Request.QueryString.Keys)
                {
                    if (QRKey != "Report")
                    {
                        // Is a parameter to set
                        Telerik.Reporting.Report rep = (Telerik.Reporting.Report)ret;
                        if (rep.ReportParameters.Contains(QRKey))
                        {
                            rep.ReportParameters[QRKey].Value = Request.QueryString[QRKey];
                        }
                    }
                }
                return ret;
            }
            catch (Exception oE)
            {
                return null;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Telerik.Reporting.IReportDocument rd = Get_Report(Request.QueryString["Report"]);
            if (rd != null)
            {
                ReportViewer1.Report = rd;
                this.Title = rd.DocumentName;
                ReportViewer1.ShowParametersButton = true;
            }
            }
        }
         
    }
}

5 Answers, 1 is accepted

Sort by
0
Steele
Top achievements
Rank 1
answered on 31 Aug 2011, 07:02 AM
No one had this issue?
0
Peter
Telerik team
answered on 01 Sep 2011, 04:18 PM
Hi Steele,

The experienced behavior is due to the ASP.NET Session implementation. ASP.NET Session state blocks other requests with the same session ID. You may find it useful to check the Weird problem with session state and callbacks ASP.NET forum thread for more information.

If you don't need to use the Session in the initial page then our suggestion is to disable it with a page directive as shown in the following snippet:

Copy Code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="TestTelerikWebApp.ReportCancel.MainPage" EnableSessionState="False" %>

Hope this helps.

Greetings,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Steele
Top achievements
Rank 1
answered on 05 Sep 2011, 04:43 AM
Ok, I can understand this clash.
Would rewriting the reporting request as a webservice circumvent this issue?
We use the Session to track user input states and (on occasion) to track viewstate. So turning it off in the calling page(s) is not an option.
Any tips?
Thanks,
Steele.
0
Chavdar
Telerik team
answered on 05 Sep 2011, 08:51 PM
Hello Steele,

The web report viewer relies on the Session to pass information about the report through it to the http handler that serves its requests/operations. As long as the viewer uses the Session to store information and the asp.net framework serializes the requests with the same SessionID (it should be the same session, otherwise the information will be lost) we do not see any possible workaround for your requirement.

The only way to solve the issue according to us is to make the viewer work without using the asp.net Session. This, however, will require a major rework of the viewer and an implementation of an external storage for the report data which is not an easy task. Still,  we are considering to make this change for a future release.

Regards,
Chavdar
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Steele
Top achievements
Rank 1
answered on 06 Sep 2011, 03:06 AM
As I said in the support ticket, having a user wait out the time for a closed report is grossly impractical.
I would urge for this to be rectified.
Thanks,
Steele.
Tags
General Discussions
Asked by
Steele
Top achievements
Rank 1
Answers by
Steele
Top achievements
Rank 1
Peter
Telerik team
Chavdar
Telerik team
Share this question
or