HTML View content not always updating

  • 3p
    azoccolillo3p 3 months, 2 weeks ago

    We have a report that uses a FormattedText box inside of a table. When we have 2 windows open…one with the edit for for a record, the other is the HTML report viewer…. data in the report is not showing the changes saved while editing. Even if we close the web page and reopen, the updated data in a FormattedText box is not updating (as though it were cached). I’m certain the data changes are being saved, as I can see them in SQL server. Also, if I export the report to PDF the changes are there…only within the viewer are they not changing. I’ve tried deleting browser cache, reloading the report, changing parameters, etc…nothing works.

    Any ideas? Is there a way to flush a cache from code?


  • 195p
    AbdiasM195p 3 months, 2 weeks ago

    Have you tried disposing the report object after updating the value in the database and re-loading the report in the WebViewer like below:

    SqlConnection conn = new SqlConnection(connString);
     SqlCommand cmd = new SqlCommand(“Update HtmlContent set HtmlText=’<body>Modified Value</body>‘”, conn);
     rpt = new PageReport();
     rpt.Load(new FileInfo(Server.MapPath(“~/Reports/RdlReport1.rdlx”)));
     WebViewer1.Report = rpt;

    When I tried this, it displayed the modified value from the database.

  • 3p
    azoccolillo3p 3 months, 2 weeks ago

    I don’t really follow this…

    I don’t load my report from the controller. I’m using the MVC HTML Viewer. The report gets loaded from javascript.
    // Set up buttons to change reports
    var reportsButtons = $(‘#btnReport button’);
    reportsButtons.bind(‘click’, function (ev) {
    var target = $(;
    var reportOption = {
    id: target.attr(‘data-bind’)
    reportsButtons.prop(‘disabled’, true);
    viewer.option(‘report’, reportOption);

    $(‘#btnReport button’).first().addClass(‘active’);
    viewer.option(‘uiType’, ‘desktop’);
    }, 800);

  • 51p
    Deepak Sharma51p 3 months, 1 week ago


    Calling the ‘Refresh()’ on HTML 5 Viewer control should reload the Report with updated changes in this case.
    Please have a look at the attached sample application, make any changes to ‘customers.json’ file and see that the updated values can be seen on the report “Test.rdlx’ after clicking on “refresh’ button.

    Deepak Sharma

  • 3p
    azoccolillo3p 3 months, 1 week ago

    I’ve added a refresh button to the viewer but it will take some time to see if this takes care of the problem.

  • 51p
    Deepak Sharma51p 3 months, 1 week ago

    It works fine at my end for reloading the report with updated database values. In case the issue still remains unresolved , please feel free to get back to me.

    Deepak Sharma

  • 3p
    azoccolillo3p 3 months ago

    Ok, after some experimentation the refresh button running viewer.refresh() does not refresh the data. I need to reload the page to get the data to refresh. When I reload the page, the data is already refreshed correctly. Is this an issue with the browser caching content?

  • 51p
    Deepak Sharma51p 3 months ago


    I tested this issue with both the JSON and OLEDB database. It is working absolutely fine here at my end.
    After loading the report in Viewer I made few changes in the database table and JSON file and found the changes updated in report on refreshing the Viewer using the code I provided in my earlier post.

    You may try reloading the browser window by calling :

    function funRfresh()
    window.location = window.location;

    In case the issue still persists, please provide me a small sample application to debug it further.

    Deepak Sharma

  • 3p
    azoccolillo3p 3 months ago

    Oh, I didn’t have the window.location = window.location; line in my code. That fixed it. Works great now, thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.