Layeksbeazy
New Member
I have a problem when using a subreport in my report.I have a query which produced only one record. And I've arranged for one record displayed one page.When there is a subreport, it prints 2 pages, wherein the second page blank. And I see the following exception:\[code\]Apr 01, 2013 5:45:25 PM net.sf.jasperreports.view.JRViewer paintPageSEVERE: Page paint error.net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Image read failed. at net.sf.jasperreports.engine.export.draw.PrintDrawVisitor.visit(PrintDrawVisitor.java:143) at net.sf.jasperreports.engine.export.draw.PrintDrawVisitor.visit(PrintDrawVisitor.java:57) at net.sf.jasperreports.engine.fill.JRTemplatePrintImage.accept(JRTemplatePrintImage.java:442) at net.sf.jasperreports.engine.export.draw.FrameDrawer.draw(FrameDrawer.java:251) at net.sf.jasperreports.engine.export.draw.FrameDrawer.draw(FrameDrawer.java:199) at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportPage(JRGraphics2DExporter.java:273) at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReportToGraphics2D(JRGraphics2DExporter.java:246) at net.sf.jasperreports.engine.export.JRGraphics2DExporter.exportReport(JRGraphics2DExporter.java:184) at net.sf.jasperreports.view.JRViewer.paintPage(JRViewer.java:2104) at net.sf.jasperreports.view.JRViewer$PageRenderer.paintComponent(JRViewer.java:2254) at javax.swing.JComponent.paint(JComponent.java:1054) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JViewport.paint(JViewport.java:731) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintChildren(JComponent.java:887) at javax.swing.JComponent.paint(JComponent.java:1063) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5221) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1512) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1443) at javax.swing.RepaintManager.paint(RepaintManager.java:1236) at javax.swing.JComponent._paintImmediately(JComponent.java:5169) at javax.swing.JComponent.paintImmediately(JComponent.java:4980) at javax.swing.RepaintManager$3.run(RepaintManager.java:796) at javax.swing.RepaintManager$3.run(RepaintManager.java:784) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:784) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:757) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:706) at javax.swing.RepaintManager.access$1000(RepaintManager.java:62) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1651) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:697) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)\[/code\]I've been looking expcetion above problems, as InputStream or no image. And the above exception because the second page that appears. Where the second page I did not expect.In the subreport, I made 2 columns to display the image, and I put it on pageHeader and columnHeader band. So there are 4 pictures, 2 in pageHeader and 2 more in columnHeader.Any suggestions? Please help, thank you.