Image not appearing in report

By: Eric Rapp - erapster
Image not appearing in report
2002-10-28 15:11
Has anyone experienced this problem?

I am includeing an image in my report. The code below worked back in may and I'm now upgrading to the new version of Jasper.

Report Code:
<parameter name="LogoImage" class="java.awt.Image" />

<reportElement x="0" y="5" width="73" height="73" />
<graphicElement />
<imageExpression class="java.awt.Image">$P{LogoImage}</imageExpression>

Java code:
Image image = Toolkit.getDefaultToolkit().createImage(appPath+"images/header2.gif");
MediaTracker tracker = new MediaTracker(new Panel());
tracker.addImage(image, 0);
}catch(Exception e){e.printStackTrace();}

Map parameters = new HashMap();

bytes = JasperManager.runReportToPdf(reportFile.getPath(), parameters,jrds);

I am not sure what has changed that would not allow this to work anymore. I welcome an comments


By: Teodor Danciu - teodord
RE: Image not appearing in report
2002-10-29 13:31


Nothing changed as far as images are concerned.
Do you get any warnings when you compile your
report design?
I suspect the image element does not fit the band

Can you send me your XML report design?

Thank you,
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 17 years 1 month ago

0 Answers:

No answers yet