I would like to create a report with iReport for MS Excel.
My report includes two subreports. I need each subreport in a separate Excel sheet, but the generated export file has all data in one sheet.
I don't know which settings for this option required is.
Best Answer
You can solve this issue with help of net.sf.jasperreports.export.xls.break.after.row property.
You can set this net.sf.jasperreports.export.xls.break.after.row property for the "sheets break" element in report (for example, line or staticText element).
In my sample below I've put line element to the Group Footer band for generating new sheet in Excel for a new group.
Here is my sample, master report:
My subreport:
The result will be:
The result without using of "break" element (I removed the line with net.sf.jasperreports.export.xls.break.after.row property) will be:
You can find more about info in Advanced Excel Features post.