jochen69 Posted March 16, 2011 Share Posted March 16, 2011 Hello,i use version 3.3.1I take over the software from another developer. I never did anything with jasper. So i am ablsolute newbie.So, can somebody describe me, why code below raised annet.sf.jasperreports.engine.JRException: The images directory was not specified for the exporter.???The images path is in web root like always. Please help! Thank you,JochenCode:public static void createHTMLReport(JasperPrint jasperPrint,HttpServletResponse response) throws JRException, IOException{ PrintWriter out = response.getWriter(); JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING,"UTF-8"); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "images\\"); exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, "<br>"); exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE); exporter.exportReport(); out.flush(); out.close(); } 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