Hi,

You have to set imageDir and imageUri on exporter. My class to export report to html on my webapps is:

-------------------------------------------------------------------------------------
import my.imports. ....

import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.jasperreports.engine.export.JRHtmlExporter;
import net.sf.jasperreports.engine.export.JRHtmlExporterParameter;
import net.sf.jasperreports.j2ee.servlets.ImageServlet;


public class HtmlExporter implements Exporter
{
public void export(List jPrintList, HttpServletRequest request, HttpServletResponse response)
   {
       try
       {
           SetHeader.setHeaderToHtml(response);
           PrintWriter out = response.getWriter();

           JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRHtmlExporterParameter.JASPER_PRINT_LIST, jPrintList); exporter.setParameter(JRHtmlExporterParameter.OUTPUT_WRITER, out); exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, ApplicationConfiguration.getPathImageDir()); exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, ApplicationConfiguration.getUriImage()); exporter.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, ApplicationConfiguration.getRemoveEmptySpaceBetweenRows());

           if(ApplicationConfiguration.isOutputImagesToDir())
           {
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
           }
           else
           {
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.FALSE); request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_LIST_SESSION_ATTRIBUTE, jPrintList);
           }

           exporter.exportReport();
       }
       catch (Exception e)
       {
           throw e;
       }
   }
}
-------------------------------------------------------------------------------------------------------------------------------

[]'s


Kummetha, Ragu wrote:







Hi,







I have a web-application using JasperReport




I'm having the same problem with my images in the sense the pdf version

is ok without any problems, but the html version of my report is

displayed without images and bands. The web- application is developed

using Jdeveloper, on Jdeveloper when executed using OC4J it the pdf is

fine but the html is without the images,  but when deployed on  Oracle

AS running on Redhat Linux3.0 Enetrprise Server nothing works. Does anyone have a soution for this?




Thanks and Regards,



Ragunatha Reddy Kummetha.





--
Henrique Rogerio de Oliveira
Desenvolvedor de Software
W3S Solutions <www.w3s.com.br>
+55 11 4052-9376 Ramal: 302
+55 11 2626-7181 Ramal: 302
+55 16 3331-2125 Ramal: 302
+55 16 9777-7495
[EMAIL PROTECTED]



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jasperreports-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to