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

Problem displaying images in html report


anyulled

Recommended Posts

Greetings. 

I've been trying to display my report in html but it doesn't show correctly the images, instead, I see every image has as a src attribute the word nullimg followed by a series of numbers ( like nullimg_0_33_66).

I've read in some other place that I have to use an image servlet for that purpose, but I can't find it here.

 

this is the code i'm using for the Html Exporter:

JRHtmlExporter htmlExporter = new JRHtmlExporter(); htmlExporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE); htmlExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); htmlExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, byteArrayOutputStream); htmlExporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, "/opt/apache-tomcat-6.0.18/webapps/Simm/images");
htmlExporter.exportReport();

Code:
JRHtmlExporter htmlExporter = new JRHtmlExporter(); htmlExporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE); htmlExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); htmlExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, byteArrayOutputStream); htmlExporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, "/opt/apache-tomcat-6.0.18/webapps/Simm/images"); htmlExporter.exportReport();
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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