FastReport.Net 3.3 Crashes in all versions of internet explorer

FastReport.Net 2017 3.3 makes a call to the javascript console using console.info(). console is not supported in any version of internet explorer (11 and down) unless the console is actually open. This causes report not to render and you're left with a spinner in the middle of the page.

This is the function responsible; first line.
function onFrAjaxSuccess(data, textStatus, request) {
    console.info("FastReport data length " + data.length);
    obj = request.getResponseHeader("FastReport-container");
    div = document.getElementById(obj);
    div = frReplaceInnerHTML(div, data);
    var scripts = div.getElementsByTagName('script');
    for (var i = 0; i < scripts.length; i++)
        eval(scripts[i].text);
}

Comments

  • edited June 2017
    If anyone is still having trouble with this, a fairly simple solution is to define the function yourself somewhere in your page before the report is rendered. At least until the fast-report people fix it.

    There is a fairly complete solution up on stack overflow here:

    https://stackoverflow.com/questions/3326650...916941#16916941

    // Avoid `console` errors in browsers that lack a console.
    (function() {
        var method;
        var noop = function () {};
        var methods = [
            'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
            'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
            'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
            'timeStamp', 'trace', 'warn'
        ];
        var length = methods.length;
        var console = (window.console = window.console || {});
    
        while (length--) {
            method = methods[length];
    
            // Only stub undefined methods.
            if (!console[method]) {
                console[method] = noop;
            }
        }
    }());
    

Leave a Comment