Jump to content
Changes to the Jaspersoft community edition download ×

Excel report without page division


2005 IR Help

Recommended Posts

By: Pablo Paggi - larvamdp

Excel report without page division

2004-05-06 07:06

Hi !!

I want to generate an Excel report without page division.

My application exports reports in PDF an Excel format but I need that de second one hasn´t page division. I have to fix this in runtime.

I can't put any information about it in the xml file because is the same file for both report format.

 

 

 

 

By: Mark Engstrom - me2kme

RE: Excel report without page division

2004-05-07 01:38

 

The following code example shows how to export to Excel and either split or not split the pages.

 

exporter.setParameter(JRExporterParameter.JASPER_PRINT, m_jdPrintOut);

exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, strFilename);

 

if ( !allOnOnePage ) {

exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);

} else {

exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);

exporter.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);

}

 

 

One thing to note however, is that when I do this I had to be careful with the pageHeader and pageFooter parts of the report because the extract to Excel didn't always like them being there.

 

 

There are some tips on reports in excel in the jasper documentation as well.

 

 

 

 

By: Pablo Paggi - larvamdp

RE: Excel report without page division

2004-05-07 06:56

Thaks Mark !!!

The problem was the Page Footer section. I erased this section and worked fine. But I still have a question.

Can I remove in the report the headers of columns between the pages? Because the report appears in one page only but the headers of the columns appears in the middle and I want them at top (only once) and below the data.

Thanks in advance.

 

Pablo.

 

 

 

 

By: Mark Engstrom - me2kme

RE: Excel report without page division

2004-05-07 07:09

 

I had a similar problem and I had to move the pageheader into the <title> band. But then again the report I was looking at only had one column to it and that may be that useful to you.

 

Any footer information again had to be moved to the <summary> section but that was only for a one column report. Can I suggest that you look at the nopagebreak example in the demos you get when you download jasper that may be of some use.

 

Sorry I can't be of any further help.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...