No Chart Image In jasper HTML Output

Hi All

We have recently started using the Jasper plugin for certain tasks.

Upon experimenting, it seems that when using the following code to generate html reports on disk, the charts within the report just show as broken links to images.

var compileSuccess = plugins.jasperPluginRMI.compileReport('componentGroupsVsCrit.jrxml')
var runReport = plugins.jasperPluginRMI.runReport('scm_maersk_duc','componentGroupsVsCrit.jasper','C:/Servoy/testOutputhtml.html',OUTPUT_FORMAT.HTML,paramsObj)

When using the same code to create pdf documents or XLS files it works as expected.

Could anyone shed any light on what im doing wrong.

Regards

Zuke

Any Jasper of Plugin Gurus got an idea on this one?

Some ideas to try:

  1. check forum for showing images in Jasper reports (maybe path or byte array incorrect?)
  2. does the report work in iReport correctly for the html output?
  3. are the images passed in via the params obj relative or absolute paths?
  4. Do you get the same result if you compile in iReport and use the .jsaper file produced instead of compiling via the script? (related - does the output of the scripted compile go to the expected directory that the runReport expects?

Hi Thomas

  1. The images are jasper charts so when i talk about images im referencing the images of the charts that jasper creates. So im not actually creating and passing any images to the report, just trying to generate a report with a chart, and when run the area of the report which should have a chart and legend is just an empty html page with place holders where the chart and legend should be.
  2. Yes this works with ireport
  3. As above
    4.I will try this and post the outcome.

We have tested with exports in xls format and pdf(we only changed the output format and extension)
Ans this worked as expected.

Pulling my hair out with this one

Regards

McCourt and Ian,

I saw your post the other day and was reticent to respond, because I have no experience using HTML data in iReport (as well as considering myself a novice). However, I found this in the iReport Utlimate Users Guide:

Here is a list of the data source and connection types provided by iReport:
 JDBC connection
 JavaBean collection data source
 XML data source
 CSV data source
 Hibernate connection
 Spring-loaded Hibernate connection
 JRDataSourceProvider
 Custom data source
 Mondrian OLAP connection
 XMLA connection
 EJBQL connection
 Empty data source

It doesn’t mention HTML in the list nor could I find any reference to HTML data by searching the document. I didn’t find much searching the iReport forum, either (perhaps, posting there may generate some results).

I can tell you that we have created reports containing pie-charts using iReport, but we are passing a foundset to the report, not HTML. So, I was just thinking that the chart and script part of iReports does not handle HTML data.

You may also want to contact Jason Meunier…he is the defacto guru for iReports at Servoy.

Hi

we arent actually passing html. Rather we are jusr specifying html as the output format of the report as per the constants provided with the plugin. So nothing fancy

Have you tried the report in ireport and specifying the output to be html?
If this works then what are the links that are missing? This might be a clue as to where they are placed on the client.

Hi

Yes we have tried this with ireport and it is generated just fine

when i inspect page source this is what i get

<html> 
<head> 
  <title></title> 
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
  <style type="text/css"> 
    a {text-decoration: none}
  </style> 
</head> 
<body text="#000000" link="#000000" alink="#000000" vlink="#000000"> 
<table width="100%" cellpadding="0" cellspacing="0" border="0"> 
<tr><td width="50%"> </td><td align="center"> 
 
<a name="JR_PAGE_ANCHOR_0_1"></a> 
<table style="width: 740px; border-collapse: collapse" cellpadding="0" cellspacing="0" border="0"> 
<tr> 
  <td><img alt="" src="componentGroupsVsCrit.html_files/px" style="width: 740px; height: 1px;"/></td> 
</tr> 
<tr valign="top" style="height:330px"> 
  <td><img src="componentGroupsVsCrit.html_files/img_0_0_0" style="height: 330px" alt=""/></td> 
</tr> 
<tr valign="top"> 
  <td><img alt="" src="componentGroupsVsCrit.html_files/px" style="width: 740px; height: 40px;"/></td> 
</tr> 
</table> 
 
</td><td width="50%"> </td></tr> 
</table> 
</body> 
</html>

Im at a loss

Also for some reason none of my reports that currently work in smart client will compile in web client.

I am getting the following error on compile using the plugin

Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_componentGroupsVsCrit_1310725514121_96070: 18: unable to resolve class JREvaluator 
 @ line 18, column 1.
calculator_componentGroupsVsCrit_1310725514121_96070: 25: unable to resolve class JRFillParameter 
 @ line 25, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 26: unable to resolve class JRFillParameter 
 @ line 26, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 27: unable to resolve class JRFillParameter 
 @ line 27, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 28: unable to resolve class JRFillParameter 
 @ line 28, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 29: unable to resolve class JRFillParameter 
 @ line 29, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 30: unable to resolve class JRFillParameter 
 @ line 30, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 31: unable to resolve class JRFillParameter 
 @ line 31, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 32: unable to resolve class JRFillParameter 
 @ line 32, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 33: unable to resolve class JRFillParameter 
 @ line 33, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 34: unable to resolve class JRFillParameter 
 @ line 34, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 35: unable to resolve class JRFillParameter 
 @ line 35, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 36: unable to resolve class JRFillParameter 
 @ line 36, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 37: unable to resolve class JRFillParameter 
 @ line 37, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 38: unable to resolve class JRFillParameter 
 @ line 38, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 39: unable to resolve class JRFillParameter 
 @ line 39, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 40: unable to resolve class JRFillParameter 
 @ line 40, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 41: unable to resolve class JRFillParameter 
 @ line 41, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 42: unable to resolve class JRFillParameter 
 @ line 42, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 43: unable to resolve class JRFillField 
 @ line 43, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 44: unable to resolve class JRFillField 
 @ line 44, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 45: unable to resolve class JRFillVariable 
 @ line 45, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 46: unable to resolve class JRFillVariable 
 @ line 46, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 47: unable to resolve class JRFillVariable 
 @ line 47, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 48: unable to resolve class JRFillVariable 
 @ line 48, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 49: unable to resolve class JRFillVariable 
 @ line 49, column 5.
calculator_componentGroupsVsCrit_1310725514121_96070: 72: unable to resolve class JRFillParameter 
 @ line 72, column 35.
calculator_componentGroupsVsCrit_1310725514121_96070: 73: unable to resolve class JRFillParameter 
 @ line 73, column 35.
calculator_componentGroupsVsCrit_1310725514121_96070: 74: unable to resolve class JRFillParameter 
 @ line 74, column 40.
calculator_componentGroupsVsCrit_1310725514121_96070: 75: unable to resolve class JRFillParameter 
 @ line 75, column 38.
calculator_componentGroupsVsCrit_1310725514121_96070: 76: unable to resolve class JRFillParameter 
 @ line 76, column 33.
calculator_componentGroupsVsCrit_1310725514121_96070: 77: unable to resolve class JRFillParameter 
 @ line 77, column 42.
calculator_componentGroupsVsCrit_1310725514121_96070: 78: unable to resolve class JRFillParameter 
 @ line 78, column 38.
calculator_componentGroupsVsCrit_1310725514121_96070: 79: unable to resolve class JRFillParameter 
 @ line 79, column 43.
calculator_componentGroupsVsCrit_1310725514121_96070: 80: unable to resolve class JRFillParameter 
 @ line 80, column 39.
calculator_componentGroupsVsCrit_1310725514121_96070: 81: unable to resolve class JRFillParameter 
 @ line 81, column 41.
calculator_componentGroupsVsCrit_1310725514121_96070: 82: unable to resolve class JRFillParameter 
 @ line 82, column 40.
calculator_componentGroupsVsCrit_1310725514121_96070: 83: unable to resolve class JRFillParameter 
 @ line 83, column 48.
calculator_componentGroupsVsCrit_1310725514121_96070: 84: unable to resolve class JRFillParameter 
 @ line 84, column 42.
calculator_componentGroupsVsCrit_1310725514121_96070: 85: unable to resolve class JRFillParameter 
 @ line 85, column 43.
calculator_componentGroupsVsCrit_1310725514121_96070: 86: unable to resolve class JRFillParameter 
 @ line 86, column 38.
calculator_componentGroupsVsCrit_1310725514121_96070: 87: unable to resolve class JRFillParameter 
 @ line 87, column 38.
calculator_componentGroupsVsCrit_1310725514121_96070: 88: unable to resolve class JRFillParameter 
 @ line 88, column 31.
calculator_componentGroupsVsCrit_1310725514121_96070: 89: unable to resolve class JRFillParameter 
 @ line 89, column 44.
calculator_componentGroupsVsCrit_1310725514121_96070: 98: unable to resolve class JRFillField 
 @ line 98, column 35.
calculator_componentGroupsVsCrit_1310725514121_96070: 99: unable to resolve class JRFillField 
 @ line 99, column 23.
calculator_componentGroupsVsCrit_1310725514121_96070: 108: unable to resolve class JRFillVariable 
 @ line 108, column 32.
calculator_componentGroupsVsCrit_1310725514121_96070: 109: unable to resolve class JRFillVariable 
 @ line 109, column 34.
calculator_componentGroupsVsCrit_1310725514121_96070: 110: unable to resolve class JRFillVariable 
 @ line 110, column 33.
calculator_componentGroupsVsCrit_1310725514121_96070: 111: unable to resolve class JRFillVariable 
 @ line 111, column 31.
calculator_componentGroupsVsCrit_1310725514121_96070: 112: unable to resolve class JRFillVariable 
 @ line 112, column 33.
51 errors

I have tried this on multiple machines with the same results

Is groovy your script language in the report? It is the default so you may need to change it to java …

What version of the plugin do you use?

Hi

After investigation it seems that when producing charts using ireport, a hidden sub dir is created containing the images for the chart.

The same is not the case when using the plugin with servoy. The html file is created but the sub dir is not.

Any thoughts?

This will only happen in smart client, right?

If so, before calling the Jasper plugin creates the subdirectory on your machine, that is, if you save the resulting html file in / home/user-01/docs / and the images in subdirectory called “images”, create / home / user-01/docs/images and then calls the plugin.

You tell us the result.

Best regards.

Hi

This is happening in both smart and web client.

The folder name iReport generates is the same as the report name with .html_files amended to the end of its name.
I have tried creating this folder manually but and then running the report, but it has no effect.

Regards

Also after installing the latest version of the plugin from servoyforge

All output format constants are no longer available from the treeview in solution explorer

Is this a bug?

Zuke:
Also after installing the latest version of the plugin from servoyforge

All output format constants are no longer available from the treeview in solution explorer

Is this a bug?

Are you still getting this? Did you do a clean install of the plugin or an update?

Regards,
Andrei

Yes we are still seeing this but have not tried a clean install yet.

I will post our findings