Jump to content
Changes to the Jaspersoft community edition download ×

Images by parameter

2005 IR Help

Recommended Posts

By: serg - sergduarte

Images by parameter

2004-07-21 03:12


I wont to pass an image URL from my server, by parameter. Just something like this.






and the image?s type is


<image scaleImage="Clip">

<reportElement mode="Opaque" x="85" y="7" width="57" height="48"/>

<graphicElement pen="1Point"/>

<imageExpression class="java.net.URL"><![CDATA[new URL($P{image1})]]></imageExpression>



and i get this exception on server

... 13 more

Caused by: java.lang.IllegalArgumentException: Width (-1) and height (-1) cannot be <= 0

at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999)

at java.awt.image.BufferedImage.<init>(BufferedImage.java:250)

at dori.jasper.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:967)

at dori.jasper.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:418)

at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:363)

at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:230)

at dori.jasper.engine.JasperExportManager.exportReportToPdfStream(JasperExportManager.java:174)

at dori.jasper.engine.JasperPrintManager.printReportToPdfStream(JasperPrintManager.java:145)

at dori.jasper.engine.JasperManager.printReportToPdfStream(JasperManager.java:385)

at es.indra.icaro.comun.reports.ReportsRunner.creaInformesInformeCompleto(ReportsRunner.java:219)

at es.indra.icaro.comun.stateless.bean.ConsultaReportsFacadeBean.crearInforme(ConsultaReportsFacadeBean.java:34)

at es.indra.icaro.comun.stateless.bean.ConsultaReportsFacade_oftwog_EOImpl.crearInforme(ConsultaReportsFacade_oftwog_EOImpl.java:46)




Can somebody help me please





By: C-Box - c-box

RE: Images by parameter

2004-07-21 03:39

Can you access the image from server side??? It seems, that the image is not accessable from server to the server doesn't find the URL and returns NULL... so a picture with NULL has size = -1 and throws that exception.

Perhaps you should first try to find out, if the image can be access from ServerSide.




Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...