JasperReports JRBeanCollectionDataSource is still confused

So, now I have my working and filling reports. Now users of my program can transfer objects from the program to the report object and populate it using JRBeanCollectionDataSource, and it really works. However, I cannot get all the data in the report that I want. I am just very confused by this, as the fields that I declare with the name and class map to the beans properties in my collection.

I have a persistent hibernate object called Item

The item has list properties.

and a property is a table containing the name, type, and value (increasingly persistent objects).

I need to show in my reports not only the properties of beans, but also the properties of beans, which are in the lists of other beans. I use iReport to create reports, and I can do JavaBeanDataSource, as well as HQL, but since when I run the report, it will have a collection of beans to populate, but I need to get only certain elements of the collection depending on the criteria to display fields in my report, such as:

properties.value, where properties.name = 'foo'

where properties is a property of the bean collection in my data source, basically having a query that requests data in a bean as my field, and even to create a sub-report that lists the properties that are in the collection, which is a property bean.

Any help and guidance is greatly appreciated, thank you very much!

Joshua

+3

Source: https://habr.com/ru/post/1708999/


All Articles