7 jun
2017

Ayuda a la hora de generar un jasperReport

Muy buenas tardes, estoy aquí atascado con mi proyecto de programación a la hora de generar un jasperReport y me está causando un montón de quebraderos de cabeza sin resultado alguno.

Aquí mi método:

public void imprimirListado() {
//Escoge la ruta en el que se encuentra el documento
        String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
        path = path.split("")[0] + "C:\\Users\\Ángel\\Desktop\\Ángel\\DAM\\programación\\LinkedList TRABAJO GRUPAL\\workspace\\Proyecto-final\\Desforsa_Academia\\src\\Reportes\\report1.jrxml";

        try {
//Escoge el informe listado Facturas para imprimirlo
            JasperReport contenido = JasperCompileManager.compileReport(path); 
            JasperPrint mostrar = new JasperPrint();
            mostrar = JasperFillManager.fillReport(contenido, null, getConexion()); //Error aqui
            JasperViewer view = new JasperViewer(mostrar, false);
            view.setVisible(true);
        } catch (JRException ex) {
             Logger.getLogger(Modelo_admin.class.getName()).log(Level.SEVERE, null, ex );
        }

    }

CONTROLADOR:

case imprimir: {

                this.modeloAdmin.imprimirListado();

            }

Y ME DA EL SIGUIENTE ERROR:

jun 07, 2017 5:27:43 PM net.sf.jasperreports.engine.component.ComponentsEnvironment findBundles ADVERTENCIA: Found two components for namespace http://jasperreports.sourceforge.net/jasperreports/components jun 07, 2017 5:27:43 PM net.sf.jasperreports.engine.component.ComponentsEnvironment findBundles ADVERTENCIA: Found two components for namespace http://jasperreports.sourceforge.net/jasperreports/components Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:121) at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:88) at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:103) at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:61) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:55) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:849) at Modelo.Modelo_admin.imprimirListado(Modelo_admin.java:640) at Controlador.Controlador_admin.actionPerformed(Controlador_admin.java:505) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font ' net/sf/jasperreports/fonts/pictonic/pictonic.ttf net/sf/jasperreports/fonts/pictonic/pictonic.svg net/sf/jasperreports/fonts/pictonic/pictonic.eot net/sf/jasperreports/fonts/pictonic/pictonic.woff ' is not available to the JVM. See the Javadoc for more details. at net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358) at net.sf.jasperreports.engine.fonts.SimpleFontFace.getInstance(SimpleFontFace.java:72) at net.sf.jasperreports.engine.fonts.SimpleFontFamily.setNormal(SimpleFontFamily.java:99) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:261) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(SimpleFontExtensionHelper.java:232) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:193) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:162) at net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:56) at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:110) at net.sf.jasperreports.engine.util.JRStyledTextParser.(JRStyledTextParser.java:83) ... 46 more

Siempre me lo da aqui:

mostrar = JasperFillManager.fillReport(contenido, null, getConexion());

La verdad es que he probado ya de todo, antes tenia otros fallos y los iba corrigiendo pero es es que a la hora de hacer jasper voy fallo por fallo y nunca encuentro la salida, soluciono un problema y me meto en otro. Muchas gracias

COMENTARIOS

DEJA TU COMENTARIO

© 2017 website by Rubit Corporation