Jump to content

Suddenly get "The images directory was not specified for the exporter"


jochen69

Recommended Posts

 Hello,

i use version 3.3.1

I 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 an

net.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,

Jochen

Code:
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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...