Jasper report on HTML when one image loaded from database and for the other

How to generate jasper report on HTML when one image loaded from database and for the other we give a image path

My code

ByteArrayOutputStream baos = new ByteArrayOutputStream();

exporter = new JRHtmlExporter();

exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);

exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);

exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);

exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);

exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);

exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);

exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);

exporter.exportReport();

byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();

Can any one help pls

Message was edited by:

ameet.au

[1040 byte] By [ameet.aua] at [2007-11-27 6:18:50]
# 1
You know, this is *not* JasperReports product support.If images are passed by URI, then provide one to the image on the webserver and another one to the servlet that uses its output stream with the appropriate MIME type set to deliver the image from your DB.
CeciNEstPasUnProgrammeura at 2007-7-12 17:33:02 > top of Java-index,Java Essentials,Java Programming...
# 2

hey sorry for posting it in this forum.

but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using

byte image[] =(byte[]) outData.get("image");

ByteArrayInputStream img = new ByteArrayInputStream(image);

hmimg.put("P_PARAMV3", img);

print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);

bdata= JasperExportManager.exportReportToPdf(print);

ameet.aua at 2007-7-12 17:33:02 > top of Java-index,Java Essentials,Java Programming...