Jump to content
We've recently updated our Privacy Statement, available here ×

jojobojo

Members
  • Posts

    1
  • Joined

  • Last visited

jojobojo's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi I have List<JasperPrint> object in my application ....i contains the data of 3 Jasper reports.....according to the requirement if the user presses the print button he can able to see the print dilouge box and can able to print the List<JasperPrint>.....How can we achieve this in java....Please help me.....it's very urgent......Please find the code below.....it's throwing exception..... print labels letters pressed gov.nc.ic.claimsservices.model.NcicUserInfo@1b5b8520 net.sf.jasperreports.engine.JRException : Error loading object from InputStreamJRLoader.java:215)JasperPrintManager.java:66) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged( at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged( at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: Native Method)Native Method)java.io.EOFExceptionat java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source) at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source) at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.<init>( at net.sf.jasperreports.engine.util.JRLoader.loadObject( ... 42 more ContextClassLoaderObjectInputStream.java:53)JRLoader.java:210) at net.sf.jasperreports.engine.util.JRLoader.loadObject( at net.sf.jasperreports.engine.JasperPrintManager.printReport( Code: List< JasperPrint> jprintlist = ccmsClaimsService.getPrintLetters(user1); JRExporter exporter = new JRPdfExporter(); exporter.setParameter(JRPdfExporterParameter.JASPER_PRINT_LIST,jprintlist); OutputStream output = new FileOutputStream(new File("batch1.pdf")); exporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM, output); InputStream istream = new FileInputStream("batch1.pdf"); exporter.setParameter(JRPdfExporterParameter.INPUT_STREAM, istream); JasperPrintManager.printReport(istream,true); exporter.exportReport();
×
×
  • Create New...