babo_g Posted February 1, 2011 Share Posted February 1, 2011 Hi all,i have a problem with this code : exporter.exportReport();The jsp page error is here.I don't understand why...My problem is that i need to create a merge pdf but i can't save a jrprint on hd.Can u help me please tnx Code: Post Edited by babo_g at 02/01/2011 11:09 Link to comment Share on other sites More sharing options...
szaharia Posted February 1, 2011 Share Posted February 1, 2011 Could you post the stacktrace here? Apparently the code block is ok.sanda Link to comment Share on other sites More sharing options...
babo_g Posted February 1, 2011 Author Share Posted February 1, 2011 This is a error in eclipse..Code:01-02-2011 12:37:43 | ERROR | - Errore applicativo inaspettato : nulljava.lang.ClassCastException at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:367) at it.gruppodatel.abci.action.matricepotenziale.stampa.ACT_IreportFactory.performTask(ACT_IreportFactory.java:102) at it.gruppodatel.framework.action.BaseAction.execute(BaseAction.java:44) at it.gruppodatel.abci.action.BaseABCIAction.execute(BaseABCIAction.java:93) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)01-02-2011 12:37:43 | ERROR | - Errore applicativo inaspettato : null Link to comment Share on other sites More sharing options...
szaharia Posted February 1, 2011 Share Posted February 1, 2011 Okay, now I see the problem was created by the OUTPUT_FILE_NAME parameter. :)You have 2 possibilities, when exporting a report: Use the OUTPUT_FILE export parameter, and set a java.io.File as parameter value:exporter.setParameter(JRExporterParameter.OUTPUT_FILE, new File("U:/Repository/presentationBuilder.pdf")); Use the OUTPUT_FILE_NAME export parameter, and set a String representing the file name as parameter value:exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,"U:/Repository/presentationBuilder.pdf");In your sample you set the OUTPUT_FILE_NAME parameter with a File value, and this doesn't work.Regards,sanda Post Edited by shertage at 02/01/2011 12:42 Link to comment Share on other sites More sharing options...
babo_g Posted February 1, 2011 Author Share Posted February 1, 2011 Tnx tnx tnx tnx /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif by Link to comment Share on other sites More sharing options...
cathyben3 Posted September 1, 2015 Share Posted September 1, 2015 I only know how to export PDF file while don't know how to export merged pdf file. Hope to ge a guide about it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now