Mostrando entradas con la etiqueta reportviewer. Mostrar todas las entradas
Mostrando entradas con la etiqueta reportviewer. Mostrar todas las entradas

jueves, 19 de febrero de 2015

Problemas Report Viewer web forms 10 con Internet Explorer 11

Síntomas

Algunos informe no se visualizan en Internet Explorer 11 (casualemente son los que en Chrome presentan una pequeña imagen no encontrada)

Solución:

Actualizar a la versión 11 el ReportViewer (SQL 2012) en las referencias del proyecto, los web forms, la caja de herramientas y el web.config.
El último post en esta página puede ser una buena lista de cosas a hacer (yo creo que lo conseguí con menos cosas):
http://stackoverflow.com/questions/21993721/reportviewer-ie-11

martes, 12 de febrero de 2013

Error java script con Report Viewer e Internet Explorer 9 (window.getComputedStyle)

Contexto

Página con ReportViewer en Internet Explorer 9,

Sintomas

Aparece un "Error en tiempo de ejecución de Microsoft jscript, Interfaz no compatible" al desplegar una de las listas de criterios.
El error esta relacionado con la función window.getComputedStyle.

Solución

Fuente: MikeHoffer en un articulo de Microsoft Community
  1. Prepara la página para usar jquery si aún no existe.
  2. Inserta el siguiente código en la sección de cabecera.
<!-- IE 9 throws an error when this is called, so we need to override it and catch that error -->
    <!--[if IE 9]>
    <script language="javascript" type="text/javascript">
        $(window).ready(function () {
            window.getComputedStyle = function (el, pseudo) {
                this.el = el;
                this.getPropertyValue = function (prop) {
                    var re = /(\-([a-z]){1})/g;
                    if (prop == 'float') prop = 'styleFloat';
                    if (re.test(prop)) {
                        prop = prop.replace(re, function () {
                            return arguments[2].toUpperCase();
                        });
                    }
                    //error occures on the currentStyle
                    //return el.currentStyle[prop] ? el.currentStyle[prop] : null;
                    if (typeof(el.currentStyle) == 'undefined') {
                        return null;
                    } else {
                        return el.currentStyle[prop] ? el.currentStyle[prop] : null;
                    }
                }
                return this;
            }
        })        
    </script>
    <![endif]-->