hi all,
I have a report to be generated in html. When I put an image in the
report,it doesn't show it. It shows as a blank image. when I check the
property of the image by right-clicking on it. it shows..as
image?image=img_0.
& the image url is
http://localhost:9080/StrutsProj/servlets/image?image=img_0
& the code to generate the html report is:
JRHtmlExporter exporter = new JRHtmlExporter();
request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_
ATTRIBUTE, jasperPrint);
exporter.setParameter(JRHtmlExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRHtmlExporterParameter.OUTPUT_WRITER, out);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image?image=");
Map imagesMap = new HashMap();
request.getSession().setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN,
Boolean.FALSE);
exporter.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_
ROWS, Boolean.FALSE);
exporter.setParameter(JRHtmlExporterParameter.SIZE_UNIT, "px");
exporter.exportReport();
Plz let me know if I m making any mistakes or what else shud I do to solve
this problem.
Thanks & Regards,
Meenakshi.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
jasperreports-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions