I want to create excel report which has multiple sheet is it posible to create using iReport?
Yes it is possible. In iReport set the report property net.sf.jasperreports.export.xls.one.page.per.sheet to true. Then the problem is how to make sure that page breaks occur only where you want to start a new worksheet.
What I have done is create a subreport for each worksheet. These subreports have the Ignore pagination property checked. The master report also has Ignore pagination checked. Each subreport goes in its own group header and I put a Page Break element after each subreport element. Then each subreport ends up appearing in its own Excel sheet.
Also see the net.sf.jasperreports.export.xls.break.before.row and net.sf.jasperreports.export.xls.break.after.row properties at http://jasperreports.sourceforge.net/config.reference.html
I have a report created that breaks to a new page on a new group. When I use the excel preview option, I get one page per sheet, as I want.
However, when I uploaded the report to the jaspersever repository and ran it there with the export set to xls, the resulting report was ONE sheet, and all the page headers were gone, it was just all the rows from the first page, then immediately all the rows from the second, etc.
Why is it doing this ? Do I have to configure something else? I set the export property mentioned above in iReport, but it doesn't appear that it transfers to the repository. How can I correct it so that I get a multi-worksheet excel file for my output when I run from jasperserver?
On JasperServer, in WEB-INF/classes/jasperreports.properties, do you have:
# report exporter hints override export parameters
The "report exporter hints" are the properties you set in the report. You want "false" so these report properties aren't overridden.
You'll find the export parameters (parameters to the exporter classes) defined in WEB-INF/applicationContext.xml
Hello I modified the XML file in iReport of my report, I add the property net.sf.jasperreports.export.xls.one.page.per.sheet and I set it to true like this
And when I test it in my JSF proyect it works.
This worked for me:
Have "Ignore Pagination" set to true or checked at the report level. Have the following two properties set in your report jrxml:
<property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/>
<property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/>
Then whenever you want a new worksheet in your report you define a page break at that location.