I'm trying to make PDF reports for my website with JasperReports and designing the report with iReport.
I don't want to use a database connection, I want to pass all the data directly from Java. For example, I want to pass a list of strings (names of users), and simply list that names in my PDF. I see that iReport offers a List component but I don't know how to use it, because all the documentation I found talks about listing data obtained from a database.
Could anyone help me please?
Best Answer
The only way I can think of doing it is by following:
First of all create a parameter of type java.uti.list say, name,
Create a field to display that parameter
Goto text field expression and replace $F{field_name} by $P{Name}.get(1).toString()
This prints the 2nd item in the list
I haven't found a way to loop through the list to print out every item.