Hi Teodor,

JFreeChart is used for the chart generation if that is what you mean. I
have not written any custom JRRenderable, and I thought it should be
fairly straightforward. Here is a little snippet from my prototype
report servlet, also showing how the map content was printed:

----------snip
JasperCompileManager.compileReportToFile(jrxmlFile, jasperFile);
JasperPrint jasperPrint = JasperFillManager.fillReport(
        jasperFile, new HashMap(), dbConnection);                
JRExporter exporter = new JRHtmlExporter();
StringBuffer htmlBuffer = new StringBuffer();
Map imagesMap = new HashMap();
request.getSession().setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(
        JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(
        JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(
        JRExporterParameter.OUTPUT_STRING_BUFFER,htmlBuffer);
exporter.setParameter(
        JRHtmlExporterParameter.IMAGES_URI,
        "/imageservlet?image=");
exporter.exportReport();
           
for(Object key : imagesMap.keySet()) 
    System.out.println(
        "map entry: key="+key+", value="+imagesMap.get(key));
----------snip

I'm running it on Tomcat5.5/JDK1.5.0_06/WinXP, if that could provide any
further answers. The jrxml file was generated with iReport. What makes
it really strange is, as I said, storing the chart image on disk is no
problem.

Regards,
Kjetil


> -----Original Message-----
> From: Teodor Danciu [mailto:[EMAIL PROTECTED]
> Sent: 12. januar 2006 19:50
> To: Kjetil Hoem
> Cc: jasperreports-questions@lists.sourceforge.net
> Subject: Re: [jasperreports-questions] Empty image map value
> 
> 
> Hi,
> 
> Are you using our chart component or is something custom-made?
> I'm interested in the JRRenderable implementation behind the scenes.
> 
> Thanks,
> Teodor
> 
> 
> Kjetil Hoem wrote:
> 
> >Hi all,
> >
> >I have a problem that I have been unable to find any information on
> >either in the manual, faqs, forums and this list's archives:
> >
> >The image map (JRHtmlExporterParameter.IMAGE_MAP) populated by the
html
> >exporter contains null for what was supposed to be my chart image. A
> >printout of all the items contained in this map looks like this:
> >
> >map entry: key=px, [EMAIL PROTECTED]
> >map entry: key=img_0_0_1, value=null
> >
> >As you can see, the "px" entry contains an object, and I can confirm
> >that it is the correct image data object, which works fine. The
> >"img_0_0_1" entry, on the other hand, contains nothing even though
the
> >KEY obviously is present. When I tell the exporter to store the
images
> >on disk, everything seems to be fine, and the chart is plotted
> >wonderfully correct.
> >
> >But I don't want to store the images on disk. Does anyone have any
idea
> >what may cause this strange behavior?
> >
> >Regards,
> >Kjetil Hoem
> >
> >
> >
> >
> >-------------------------------------------------------
> >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_idv37&alloc_id865&op=click
> >_______________________________________________
> >jasperreports-questions mailing list
> >jasperreports-questions@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/jasperreports-questions
> >
> >
> >
> 




-------------------------------------------------------
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_idv37&alloc_id865&op=click
_______________________________________________
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions

Reply via email to