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

ReportViewer is causing a page refresh in the AJAX UpdatePanel

7 Answers 456 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Christel
Top achievements
Rank 1
Christel asked on 11 Mar 2009, 08:03 PM
 I am using Visual Studio 2008 and Telerik Reporting Q3 2008 SP2.

The web page loads fine but when you page through the report, the webpage does a postback, which I was thinking it shouldn't do since the report is sitting in an updatepanel. Should it?

Thanks,
Christel

Here is the code, just like the article here says:
http://www.telerik.com/help/reporting/asp-net-report-viewer-ajax.html


<

 

body>

 

 

<form id="form1" runat="server">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server" />

 

 

<div>

 

 

<asp:UpdatePanel ID="updatePanel1" runat="server" >

 

 

<ContentTemplate>

 

 

<telerik:ReportViewer ID="ReportViewer1" runat="server" Height="700px" Width="700px"

 

 

Report="RMSAnalyticsReports.rptIncidentDetail, RMSAnalyticsReports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">

 

 

</telerik:ReportViewer>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

 

</div>

 

 

</form>

 

</

 

body>

 

7 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 13 Mar 2009, 10:08 AM
Hi Christel,

The ReportViewer control has its own mechanism for retrieving report pages. It uses an iframe to display the current report page and its content is populated by using a "get" request to a custom http handler which serves the requested page thus avoiding the postbacks to the page which holds the viewer. In this way all the requirements for the AJAX support are satisfied and additional roundtrips to the server and postbacks are avoided.

Because of this approach, however,  you may see in the browser's status bar the "waiting for http://.. " message but this is not a postback.  To be sure you can put a breakpoint in the Page_Load method of the page and see whether it is hit when pages are changed.

Hope this explanation helps. Let me know if you have any other questions regarding the issue.

Best wishes,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Christel
Top achievements
Rank 1
answered on 13 Mar 2009, 12:47 PM

Thanks for the info.  Then why when you page through the report without doing a post back, and you click the back button, it goes back through each of the pages instead of the page that called the report in the first place?

Thanks
Christel
0
Accepted
Chavdar
Telerik team
answered on 13 Mar 2009, 02:31 PM
Hello Christel,

As I have explained in the previous post, the ReportViewer makes a GET request to the server in order to display the next report page. As such the GET request becomes part of the browser's history and when you click on the Back button it is repeated. The good news is that once loaded in the browser's session these pages are cached so no additional requests are made to the server. And yet, the lack of Back button support in Ajax technologies is usually identified as a shortcoming, not an advantage as you may read in the Internet. Let me know if I am missing your point...

Best wishes,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Christel
Top achievements
Rank 1
answered on 13 Mar 2009, 02:36 PM
Thanks for the explanation.  You did not miss my point.  In our application, we just wanted it to work the 'normal' AJAX way, to go back to the previous web page rather than the previous pages of the report.

Thank you,
Christel
0
Chavdar
Telerik team
answered on 13 Mar 2009, 03:20 PM
Hello Christel,

I supposed the same but there is no way to change this behavior with the current implementation. Still you can consider this as an advantage as you can see all the previous report pages you have viewed without any additional cost. After reaching the initial state of the viewer you will be able to navigate to the previous web page.

Kind regards,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jenny
Top achievements
Rank 2
answered on 30 Nov 2018, 11:48 AM

Hello,

I have a page with telerik:reportviewer. I don't want postback in report when I am changing pages from arrow of reportviewer. I have used Ajax panel to avoid flickering in report or postback but it is not working. Still page is getting postback.What i do for that, how can i fix this problem?

Please help me out of this problem .

Below i have attached code which i have tried:

<telerik:RadButton Skin="Windows7" ID="RadPrintPreview" runat="server" Text="Display" OnClick="RadPrintPreview_Click"
                        Width="100px" ValidationGroup="Group1" />
 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" Height="100%">
    <telerik:ReportViewer ID="RptDynamicviewer" Visible="false" runat="server" Height="1000px" Report="HRRptSRCLib.AlertNotification, HRRptSRCLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
        Width="100%" ShowRefreshButton="True" BackColor="#FBFDFF" BorderColor="#c5c7c5" ForeColor="DarkBlue" Font-Names="Arial Narrow" BorderStyle="Solid" BorderWidth="1px"></telerik:ReportViewer>
</telerik:RadAjaxPanel>

 

0
Todor
Telerik team
answered on 05 Dec 2018, 08:24 AM
Hi Jenny,

All commands of the obsolete ASP.NET Web Forms Report Viewer are issued through an http handler and update only the report/report parameters areas and not the entire page.
There is no post back request made by the arrows for changing pages - AJAX support. Check for other elements outside the viewer that may trigger the post back.

Consider switching to the Web Forms wrapper of the new Html5 Report Viewer that is a pure HTML5/JavaScript/CSS3 jQuery-based widget.
It works in a client-server pair with the Telerik Reporting REST Service and does not make post back requests after initially loading the viewer.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items

Tags
General Discussions
Asked by
Christel
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Christel
Top achievements
Rank 1
Jenny
Top achievements
Rank 2
Todor
Telerik team
Share this question
or