We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

catch 22 maxJsonLength

Thread ID:





116988 Jul 16,2014 05:33 AM UTC Jul 16,2014 01:00 PM UTC ASP.NET MVC (Classic) 1
Tags: ReportViewer
Current Developer - Merlon
Asked On July 16, 2014 05:33 AM UTC

Hi all, 

i'm facing "The length of the string exceeds the value set on the maxJsonLength property" when i'm trying to display a big report.

i did some tricks like setting the web.config as below:
               <jsonSerialization maxJsonLength="2147483644" />

but no luck.  

As JsonResult class and ReportViewerHtmlActionResult class Inheritance from ActionResult,

i can override the json in the controller as below
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding, JsonRequestBehavior behavior)
    return new JsonResult()
        Data = data,
        ContentType = contentType,
        ContentEncoding = contentEncoding,
        JsonRequestBehavior = behavior,
        MaxJsonLength = Int32.MaxValue
but because i need to return a ReportViewerHtmlActionResult  i cannot set the maxJsonLength :(

how do you guys display a big report?
i look the sample but my report is away bigger.

any sample code?

Kind regards Aleixo

PS i'm using VS 2013 with MCV 5 

Anandakumar S [Syncfusion]
Replied On July 16, 2014 01:00 PM UTC

Hi Merlon,

We have already provided Page Virtualization support for loading large reports and internally we have set the default json length to render reports quickly. So we request you to enable the pagevirtualization option for loading large reports as show in below Code Snippet:

@{Html.Syncfusion().ReportViewer("ViewerId", (ReportViewerModel)ViewData["ReportModel"]).EnablePageVirtualization(true).Render();}

 Here is a sample that works as expected.


 Please let us know if you have any questions.


Anandakumar S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon