2001 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: Eric Rapp - erapster Image not appearing in report 2002-10-28 15:11Has 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" /> <image> <reportElement x="0" y="5" width="73" height="73" /> <graphicElement /> <imageExpression class="java.awt.Image">$P{LogoImage}</imageExpression> </image> Java code: Image image = Toolkit.getDefaultToolkit().createImage(appPath+"images/header2.gif"); MediaTracker tracker = new MediaTracker(new Panel()); tracker.addImage(image, 0); try{ tracker.waitForID(0); }catch(Exception e){e.printStackTrace();} Map parameters = new HashMap(); parameters.put("LogoImage",image); 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 E- By: Teodor Danciu - teodord RE: Image not appearing in report 2002-10-29 13:31 Hi, 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 height. Can you send me your XML report design? teodord@hotmail.com Thank you, Teodor Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now