java - Report comes two pages when using subreport -
i have problem when using subreport in report. have query produced 1 record. , i've arranged 1 record displayed 1 page.
when there subreport, prints 2 pages, wherein second page blank. , see following exception:
apr 01, 2013 5:45:25 pm net.sf.jasperreports.view.jrviewer paintpage severe: page paint error. net.sf.jasperreports.engine.jrruntimeexception: net.sf.jasperreports.engine.jrexception: image read failed. @ net.sf.jasperreports.engine.export.draw.printdrawvisitor.visit(printdrawvisitor.java:143) @ net.sf.jasperreports.engine.export.draw.printdrawvisitor.visit(printdrawvisitor.java:57) @ net.sf.jasperreports.engine.fill.jrtemplateprintimage.accept(jrtemplateprintimage.java:442) @ net.sf.jasperreports.engine.export.draw.framedrawer.draw(framedrawer.java:251) @ net.sf.jasperreports.engine.export.draw.framedrawer.draw(framedrawer.java:199) @ net.sf.jasperreports.engine.export.jrgraphics2dexporter.exportpage(jrgraphics2dexporter.java:273) @ net.sf.jasperreports.engine.export.jrgraphics2dexporter.exportreporttographics2d(jrgraphics2dexporter.java:246) @ net.sf.jasperreports.engine.export.jrgraphics2dexporter.exportreport(jrgraphics2dexporter.java:184) @ net.sf.jasperreports.view.jrviewer.paintpage(jrviewer.java:2104) @ net.sf.jasperreports.view.jrviewer$pagerenderer.paintcomponent(jrviewer.java:2254) @ javax.swing.jcomponent.paint(jcomponent.java:1054) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jviewport.paint(jviewport.java:731) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jcomponent.paintchildren(jcomponent.java:887) @ javax.swing.jcomponent.paint(jcomponent.java:1063) @ javax.swing.jcomponent.painttooffscreen(jcomponent.java:5221) @ javax.swing.repaintmanager$paintmanager.paintdoublebuffered(repaintmanager.java:1512) @ javax.swing.repaintmanager$paintmanager.paint(repaintmanager.java:1443) @ javax.swing.repaintmanager.paint(repaintmanager.java:1236) @ javax.swing.jcomponent._paintimmediately(jcomponent.java:5169) @ javax.swing.jcomponent.paintimmediately(jcomponent.java:4980) @ javax.swing.repaintmanager$3.run(repaintmanager.java:796) @ javax.swing.repaintmanager$3.run(repaintmanager.java:784) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(protectiondomain.java:76) @ javax.swing.repaintmanager.paintdirtyregions(repaintmanager.java:784) @ javax.swing.repaintmanager.paintdirtyregions(repaintmanager.java:757) @ javax.swing.repaintmanager.prepaintdirtyregions(repaintmanager.java:706) @ javax.swing.repaintmanager.access$1000(repaintmanager.java:62) @ javax.swing.repaintmanager$processingrunnable.run(repaintmanager.java:1651) @ java.awt.event.invocationevent.dispatch(invocationevent.java:251) @ java.awt.eventqueue.dispatcheventimpl(eventqueue.java:727) @ java.awt.eventqueue.access$200(eventqueue.java:103) @ java.awt.eventqueue$3.run(eventqueue.java:688) @ java.awt.eventqueue$3.run(eventqueue.java:686) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$1.dointersectionprivilege(protectiondomain.java:76) @ java.awt.eventqueue.dispatchevent(eventqueue.java:697) @ java.awt.eventdispatchthread.pumponeeventforfilters(eventdispatchthread.java:242) @ java.awt.eventdispatchthread.pumpeventsforfilter(eventdispatchthread.java:161) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(eventdispatchthread.java:150) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:146) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:138) @ java.awt.eventdispatchthread.run(eventdispatchthread.java:91)
i've been looking expcetion above problems, inputstream or no image. , above exception because second page appears. second page did not expect.
in subreport, made 2 columns display image, , put on pageheader , columnheader band. there 4 pictures, 2 in pageheader , 2 more in columnheader.
any suggestions? please help, thank you.
check size of image , check height of pageheader , columnheader band.
Comments
Post a Comment