Layna Posted March 7, 2008 Share Posted March 7, 2008 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 More sharing options...
micekmoj Posted March 10, 2008 Share Posted March 10, 2008 I think you can't do that this way.So make a wraper class and put a string field in it, and then you can acces the String via $F{yourString} Link to comment Share on other sites More sharing options...
C-Box Posted March 10, 2008 Share Posted March 10, 2008 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!!!! :-) hthC-Box 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