2004 IR Help Posted August 22, 2006 Share Posted August 22, 2006 By: keodark - keodark How to dynamically pass Images? 2005-08-02 09:01 I'd like to pass in dynamic (Java-generated) Image objects to a report. I can't use parameters because there are an arbitrary (user-defined at runtime) number of different image objects. However, it seems that a field from my datasource cannot contain an Image object... it's not in the list of accepted classes, and when I try using an Object field and casting it (everywhere) to an Image, I get a ClassCastException. It's not good enough to pass in an image's file location, because some images will be drawn in Java on-the-fly. Ideas? By: John Zoetebier - johnzoet RE: How to dynamically pass Images? 2005-08-02 14:41 >However, it seems that a field from my datasource cannot contain an Image object... JRDataSource.getFieldValue(JRField jrField) returns java.lang.Object You can return any type of object in JRDataSource. Link to comment Share on other sites More sharing options...
aacoro Posted January 24, 2011 Share Posted January 24, 2011 Very good question.I wonder who will provide a working example... Link to comment Share on other sites More sharing options...
bestofwest Posted January 25, 2011 Share Posted January 25, 2011 2 options 1. Use scriptlet 2. Use a class to do it. The first choice it's better 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