skatsnc Posted October 24, 2008 Share Posted October 24, 2008 I need to dynamically pass the location of an image to my report from Java. I have the location of the image as a parameter and then when I run it in iReport it looks fine. However when I run it in Java no image shows. Here is the code I'm using to run it from my application: JasperDesign jasperDesign = JRXmlLoader.load(reportSource); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); HashMap parameterMap = new HashMap(); parameterMap.put("rp_moNUM", moNUM); parameterMap.put("sp_barcodeFile", barcodeFile); <---Image Location JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameterMap, connection); JasperViewer.viewReport(jasperPrint, false); Any ideas? Thanks! Link to comment Share on other sites More sharing options...
ggalang Posted October 24, 2008 Share Posted October 24, 2008 try printing out the sp_barcodeFile in your report and see what it gives you in iReport and compare it to what happens in java. i had a similar problem where it ended up being a path problem Link to comment Share on other sites More sharing options...
skatsnc Posted October 24, 2008 Author Share Posted October 24, 2008 Thanks, it was just a path problem! It works now. 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