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

Subreport with ArrayList of Strings as Datasource?


Layna

Recommended Posts

Hello :).

I've got a subreport that receives an ArrayList<String> as datasource.

I am using IReport to create the Reports, and had been hoping to reach the elements of the Array by just puttign "this" as fielt into the detailBand.

Unfortunately: No success.

How do I get my Strings, then?

 

Layna .

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I did something similar some months ago...but I can't find the report (guess it was at some customer)...

 

so when I remember right it was something like this for datasource-expression:

 

Code:
new JRMapArrayDataSource($F{YourFieldOfTypeArrayList}.toArray())

 

Be sure, that your field holding the strings is of type java.util.ArrayList

 

should work!!!! :-)

 

hth

C-Box

Link to comment
Share on other sites

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