Jump to content
Changes to the Jaspersoft community edition download ×

what makes "nopagebreak" example nopagebreak?


2005 IR Help

Recommended Posts

By: Piotr Sieniawski - psieniawski

what makes "nopagebreak" example nopagebreak?

2004-08-09 06:18

Hi

the question as above plus one more

Is it possible to use parameter/variable to switch the report between being "pagebreak" and "nopagebreak"?

 

 

 

 

By: Piotr Sieniawski - psieniawski

RE: what makes "nopagebreak" example nopagebreak?

2004-08-09 09:45

To make it general:

I have report design.

The report can be exported to csv or pdf.

I need column header on every page for pdf version and no headers for csv.

 

Any ideas?

 

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: what makes "nopagebreak" example nopagebr

2004-08-09 09:53

Pass in the output type as a parameter. Use this parameter in your printWhenExpressions in the appropriate bands.

 

 

 

 

By: Piotr Sieniawski - psieniawski

RE: what makes "nopagebreak" example nopagebr

2004-08-09 10:21

I'm blind!

Thanks, it was to easy to find out ;)

Link to comment
Share on other sites

  • 4 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

I am using jasperReports 1.2.5. I want to use the pagination in my report but I want to avoid the page breaks in the generated report. I checked teh nopagebreak sample. I see the page breaks in the HTML file generated by nopagebreak sample. I ran the ant tasks in the following order.

javac

compile

fill

html

 

I could see the page breaks in the generated HTML file.

Can you please let me know if i need to pass any parameter while running the tasks?

 

Thanks,

Raffi

Link to comment
Share on other sites

That was weird, when I run that example, the generated HTML file hade some breaks between pages, But I set the parameters aaas that example in my actual code and ran the report. Now the page breaks are not there in the generated HTML file :).

May be I had some environment issues while running the example.

The parameters that I set to avoid page breaks are:

 

-------------------------------------------------------
JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRHtmlExporterParameter.BETWEEN_PAGES_HTML, "");
exporter.setParameter(JRHtmlExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
-------------------------------------------------------

 

and i set the other parameters that are required for normal report generation and exported.

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outputFileName);
exporter.exportReport();

 

And do not set isIgnorePagination to true, This will inform the engine that the whole report is a single page, which will cause problem for huge report. Better option is to have isIgnorePagination = false (which is default) and set the above parameters for HTML to avoid page breaks.

This will allow you to make use of the JRVirtualizer.

If you set isIgnorePagination to true, virtualizer will not take effect since the whole report is one page.

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