do I use a subreport or is there a better way (print one record multiple times)

Hi,

I have an excel file that contains articles which may be part of several categories. In the excel file, this is displayed via a column 'categories' that may contain a value such as "category1,category2,category3"

e.g.

Article 1 - pigeons,cats,dogs - description - price

Article 2 - dogs,poultry - description - price

 

Now, I want to create a report that groups on 'category'. so an article that belongs to category 1 and category 2 should be printed twice in the report.

So Article1 should be printed 3 times. Once in group pigeons, once in group cats and once in group dogs.

 

What's the best way to create a report where a record should be printed multiple times?

The best thing I can come up with, is

a- modify the excel file  so that article is duplicated x times for each category it belongs to 

b- create a report with as many subreports as there are categories, and per subreport, apply a condtion so that a record is only printed if it belongs to that category

 

Or does jasperstudio allow to do this without creating subreports?

 

 

tom.van.overbeke's picture
Joined: Sep 21 2018 - 11:52pm
Last seen: 4 years 8 months ago

1 Answer:

I haven't done this, but two thoughts come to mind:

  • report books
  • nested tables
elizam's picture
14410
Joined: Mar 5 2012 - 9:19am
Last seen: 2 years 10 months ago
Feedback
randomness