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

How to dynamically pass Images?


2004 IR Help

Recommended Posts

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

  • 4 years later...
  • Replies 2
  • Created
  • Last Reply

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...