Jump to content
We've recently updated our Privacy Statement, available here ×

Image Location As Parameter


skatsnc

Recommended Posts

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

  • Replies 2
  • 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...