Foundset Report and Image

Questions and answers on developing, deploying and using plugins and JavaBeans

Foundset Report and Image

Postby rieder » Thu Sep 26, 2013 5:57 pm

Hi

I followed the instruction:
<imageExpression class="java.awt.Image">
<![CDATA[com.servoy.plugins.jasperreports.JasperReportsResourceLoader.loadImage("image.gif")]]>
</imageExpression>

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
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Foundset Report and Image

Postby rieder » Tue Oct 01, 2013 8:57 am

Hi

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

Kind regards
Birgit
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Foundset Report and Image

Postby Andrei Costache » Wed Oct 02, 2013 8:26 am

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
Andrei Costache
Servoy
User avatar
Andrei Costache
 
Posts: 196
Joined: Mon Sep 07, 2009 11:53 am

Re: Foundset Report and Image

Postby rieder » Wed Oct 02, 2013 12:56 pm

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
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Foundset Report and Image

Postby Andrei Costache » Wed Oct 02, 2013 1:19 pm

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

Regards,
Andrei
Andrei Costache
Servoy
User avatar
Andrei Costache
 
Posts: 196
Joined: Mon Sep 07, 2009 11:53 am

Re: Foundset Report and Image

Postby rieder » Wed Oct 02, 2013 5:34 pm

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

Do I have to import a library?

Regards
Birgit
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Foundset Report and Image

Postby Andrei Costache » Thu Oct 03, 2013 8:12 am

rieder wrote: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
Andrei Costache
Servoy
User avatar
Andrei Costache
 
Posts: 196
Joined: Mon Sep 07, 2009 11:53 am

Re: Foundset Report and Image

Postby tgs » Thu Oct 03, 2013 10:47 am

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
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany

Re: Foundset Report and Image

Postby rieder » Thu Oct 03, 2013 11:42 am

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
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 177
Joined: Thu Jan 26, 2012 5:18 pm

Re: Foundset Report and Image

Postby tgs » Thu Oct 03, 2013 2:46 pm

rieder wrote: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
Thomas Schnaus
SAN Developer
yomotec GmbH
User avatar
tgs
 
Posts: 886
Joined: Wed Oct 04, 2006 12:05 pm
Location: Germany


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 6 guests

cron