Understanding JasperReports and JRBeanCollectionDataSource

Now I have mine JasperReportsworking from mine JRBeancollectionDataSourcein my code! I'm a little confused by some things ...

When I create reports in iReport, I create fields from the query, which I can do well and that's it, because when I actually execute the query, I use the code aa JRBeancollectionDataSource, and therefore the hql in the report is completely irrelevant at this moment?

In addition, I have lists of other permanent objects in those that I retrieve for the report, and I need a subordinate report that can display list items, but I don’t understand how to reference them from the inside, it iReportmakes sense when I'm in code. Can I just go from one field to another? those. a field called properties and a subresource referencing that field directly as properties.value?

+1
source share
2 answers

When using JRBeancollectionDataSource, I prefer to do the following:

  • Be sure to put the project class path in the "Report Import Directives" in iReport
  • . " ", " JavaBean" bean. " ", .
  • " ".

, $F (fieldName).

+1

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


All Articles