Foundset Report and Image

Hi

I followed the instruction:

but get a compilation error: Loder cannot be resolved to a type. What am I missing?
I’m using iReport 4.0.

Thanks
Birgit Rieder

Hi

Any idea on how to use an image in a foundset report?

Kind regards
Birgit

Hi Birgit,

Using an image in a foundset based report is described in here https://www.servoyforge.net/projects/se … Guidelines.
How are you compiling the report: using iReport or via the plugin’s compileReport function?
Also, what version of the plugin (and Servoy) are you using?

Regards,
Andrei

Hi Andrei

Thanks for the reply.

I did follow the instruction you described (see my copied and pasted code). If I compile the report with iReport, I do get the error I did post. If I compile with the plugin, compiling is successful. But I do get an runtime error:

ERROR: Exception from plugin: message: <java.lang.Exception: Error evaluating expression :
Source text : com.servoy.plugins.jasperreports.JasperReportsResourceLoader.loadImage(“kantiLogo.jpg”)>

The image resides in the same folder as the reports source. What am I doing wrong? Any idea?

iReport 4.0
Servoy 5.2.16
JasperPlugin 3.2.0

Thanks and regards
Birgit

Brigit, what are the values for your report directory and for the extra dirs properties? (from the admin page plugin settings)

Regards,
Andrei

For both:
/Users/birgit/workspace_reports/compiled/

Do I have to import a library?

Regards
Birgit

rieder:
For both:
/Users/birgit/workspace_reports/compiled/

Do I have to import a library?

Regards
Birgit

Birgit, please try also with a clean install of the newest 3.x version of the plugin.

Regards,
Andrei

Hi Birgit,

I also had a cuple of problems with this. The solution that is working for me is:

In iReport i have two Parameters “SUBREPORT_DIR” (java.lang.String) and “MEDIA_DIR” (java.lang.String).
On the Report I place the Image Element with the Expression “$P{SUBREPORT_DIR} + $P{MEDIA_DIR}”.

The report parameters for plugins.jasperPluginRMI.runReport() are set like:

SUBREPORT_DIR = plugins.jasperPluginRMI.relativeReportsDirectory
MEDIA_DIR = Image_Folder + “/” + image_name

Hope this helps
Thomas

Thank you, Andrei
I’ll try the newest plugin.

Thank you, Thomas, for the hint.
I did try it and it did not work. I think, the problem is still the one for foundsets: The reference to the resource cannot be resolved on the client
I think the image must somehow be compiled “into” the the report. Thats what the wiki pages tries to describe in the guidelines. But I must miss something.

Kind regards
Birgit

rieder:
Thank you, Thomas, for the hint.
I did try it and it did not work. I think, the problem is still the one for foundsets: The reference to the resource cannot be resolved on the client
I think the image must somehow be compiled “into” the the report. Thats what the wiki pages tries to describe in the guidelines. But I must miss something.

The images folder is in the reports direction on the server. The parameter SUBREPORT_DIR points to that and the MEDIA_DIR expands direction string to the image you would like.
Works for me with plugin version 3 & 4, iReport 4 & 5, Servoy 6, foundset & SQL.

Regards
Thomas