how to fix reportviewer rendering exception when EnablePartialRendering on ScriptManager is set to true

Gimi 20 Reputation points
2023-02-06T09:48:38.77+00:00

WARNING! There was an error parsing the document

In our MVC application we are calling an ASPx page (using an iframe) that contains a reportviewer control, the reports are loading but when I click "Show report" button after I give the parameters the page turns blank until full postback is finished, I found a "solution" that setting "EnablePartialRendering" to true in script manager will show a loading spinner until the data are loaded, yes the spinner is showing, but the data aren't loading and when I check Output window in Visual Studio I see  a Sys.WebForms.PageRequestManagerParseErrorException with message "The message received from the server could not be parsed".  All I want is just to show that loading spinner until data are loaded.  this is the code in my aspx:     <form id="form1" runat ="server">    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>    <asp:HiddenField ID="myHiddenField" runat="server"/>   <rsweb:ReportViewer ID="myReportViewer" runat="server" AsyncRendering="true" ProcessingMode="Remote">
<ServerReport /> 
</rsweb:ReportViewer>
 </form>   
Any help about this issue is appreciated  
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,249 questions
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,797 questions
{count} votes

Accepted answer
  1. XuDong Peng-MSFT 10,096 Reputation points Microsoft Vendor
    2023-02-13T07:06:25.4666667+00:00

    Hi @Gimi,

    I tried to reproduce this issue but failed. I got error message by the command line based on the article you mentioned, something like this: User's image

    I also cannot find it in NuGet Package. It only shows these four:

    User's image

    So I just add the reportViewer.aspx in iframe (using querystring) and it works fine . Result below:

    User's image

    User's image

    If possible, please provide more details that we can reproduce your issue. For more details about my test, please refer to the code in the attachment: SimpleDemo.txt

    Best regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment". 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

1 additional answer

Sort by: Most helpful
  1. Olaf Helper 40,736 Reputation points
    2023-02-08T11:29:53.99+00:00

    The normal MS ReportViewer control for Web don't work in MVC web application, because the callback goes to the controller of your app, not to SSRS.

    Use this instead: https://github.com/chasoliveira/ReportViewerForMvc