Jump to content

excel worksheets based on grouping or subreports


xantia95d

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

When exporting to Excel, one can combine the JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET export parameter with some other pagination attributes, in order to get data grouping per sheet.

When the document has to be represented as multiple sheets workbook, then always the JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET parameter should be set to Boolean.TRUE.

In addition to this:

  • If you need to represent each group on a separate sheet, then set the group's "isStartNewPage" attribute to true.
  • If you need to represent each subreport on a separate sheet, then set the subreport's "runToBottom" attribute to true.

Hope this helps,

sanda

Link to comment
Share on other sites

Sanda,

 

Thanks for your response, the only other question I have therefore is that if I set one page per sheet, will I not end up getting multiple sheets when the automatic page breaks occur, ie when the group extends over more than one page as some of the grouped results extend to over 500 lines per group and others only about 10 lines. If I use the IS_IGNORE_PAGINATION, then as I understand it, the report will ignore all page breaks.

Regards and thanks again

Terry

Link to comment
Share on other sites

In this case the second solution here is better: try to use one of the custom properties speciefied above, or both of them, depending on your report's specific needs, and let the IS_ONE_PAGE_PER_SHEET parameter unset. So, the inital single document sheet will be broken each time an element with such a property occurs.

Regards,

sanda



Post Edited by shertage at 01/04/2011 13:41
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...