3

I want to display multiple lists in my report. For example I have these three lists of DTOs to display :

Total vehicles : 3  
Porsche  
Ferrari  
Tesla  

Total vegetables : 2  
Potatoes  
Carot  
Salad  

Total fruits : 3  
Banana  
Apple  
Lemon

How can I display several lists?
I am used to display only one list by filling the report with this instruction (on java side) :

JasperPrint jp = JasperFillManager.fillReport(jr, new HashedMap(), new JRBeanCollectionDataSource(vegetables,false));

Then I display this list in a detail band by displaying the properties of the DTO.

Do I need to use several reports that I concatene in one report? Or can I add multiple lists in a single report?
Thank you

thomas
  • 1,201
  • 2
  • 15
  • 35
  • This doesn't answer the question as I am not referring to queries but to collectiondata sent by Java. Can you re open the topic? – thomas May 04 '21 at 07:19
  • 1
    You can use several *subDataset*s as described at first post. The second post describes how to pass data to a *subDataset*. There are a lot of another posts at SO with examples – Alex K May 04 '21 at 10:36

0 Answers0