ReportViewer AsyncRendering parameter reset

William Buchanan 26 Reputation points
2021-04-12T02:41:40.13+00:00

Hi all

Has anyone noticed that when AsyncRendering is turned on, after you press 'View Report' certain parameters are cleared of their selected value?

For example if I have a true/false option (radio button) with a default value of true - when the report viewer first loads 'true' will be selected by default. When I press 'View Report' both true and false become deselected. This means the user needs to go through all the parameters and re-select their options again.

Turning AsyncRendering to false fixes the problem - but we need it turned on for another reason so we are a bit stuck at the moment.

This is running in an MVC application.

Any thoughts on how to fix it?

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,793 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,566 Reputation points
    2021-04-13T02:48:12.957+00:00

    Hi @William Buchanan ,
    To configure the ReportViewer Web server control for asynchronous rendering, you must set the rendering and processing modes. The rendering behavior is specified by the AsyncRendering property on the control and the processing behavior is specified by the ProcessingMode property. The combination of these two properties defines how your ASP.NET pages will render.
    Asynchronous mode is the default mode. In this mode, the ReportViewer toolbar will be loaded immediately when the report is processed. In the process of processing the report, a progress indicator will be displayed in the report view area. After the report is processed, the first page will be displayed in the view area. The current page is stored in the memory or temporary storage area, depending on the configuration settings. One page will be generated at a time. When the user navigates to another report page, the next page will be generated, and the frame in the view area will be updated to display the new page. After the frame is refreshed, the toolbar options will be unavailable.

    After the report is rendered when the page is loaded, this property no longer determines the report rendering behavior. By default, all subsequent report rendering is done through asynchronous postback with AJAX partial page update, so changing this property has no effect. For more information about partial page updates and asynchronous postbacks, see Partial-Page Rendering Overview.

    To control asynchronous postback behavior, use the InteractivityPostBackMode property.

    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Joyzhao-MSFT 15,566 Reputation points
    2021-04-13T03:05:00.577+00:00

    Hi @William Buchanan
    As far as I know, ReportViewer cannot use MVC by default because it is a server-side control.

    If you use ASPX view page or view user control, you need to set AsyncRendering to false to make the report display correctly.

    Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.