How to print a model made of parameters for a number of times.

Hello,

I would to know the way how you can print a basic model made of parameters (no database connection  used) in i report 4.6.0 as showen in the image below.

Thank you.

JalalSordo's picture
Joined: Jun 27 2011 - 8:11am
Last seen: 2 years 10 months ago

1 Answer:

You cannot use the detail band, if you do not have a set of datarecords to print. Instead set the report property "When no data type" to "All sections, No detail" and use the title or summary band to layout your single value parameters.

If you want to print a collection of records in your report, you could use a collection of java beans (representing a record set) as a datasource:

new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{MyBeanCollection})

Of course, you will have to build the bean collection first outside the report...

Cheers, Thomas

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 1 month 3 weeks ago
Feedback
randomness