problem with headers(field names)

hi all,
we are into a web reporting project.we make use of jasper reports.its really good to see our reports in jasper reports formats. we have tried to export it into many formats and we have succeeded in doing that.

we are instructed to show only 20 rows per view. we have done that by adjusting the report height.

but we have a problem. The exported file ,say an xls file or a csv file ,they have the headers(field name) repeated ,which we do not require, for every page. Is there any parameter in the JRExporterParameter which will stop or avoid this repitition of field names in every page? Please help
Kannan_S's picture
Joined: Jul 24 2006 - 4:05pm
Last seen: 17 years 2 months ago

5 Answers:

Report pagination is done during report fill, hence a filled report (JasperPrint object) is already paginated.

It's not possible to change the pagination during export. That's way the parameter that controls the pagination (JRParameter.IS_IGNORE_PAGINATION) is a fill parameter.

lucianc's picture
Joined: Jul 17 2006 - 1:10am
Last seen: 23 hours 33 min ago
thanks for the reply lucian.
but thats not the requirement i was expecting.

the user should see only 20 rows in a view. The user should be presented with page numbers to view the remaining data and at the same time if the user wants to export the data into a csv file,the csv file should not have the headers repeated as each page.

So no other way?

anything as a feature request?
Kannan_S's picture
Joined: Jul 24 2006 - 4:05pm
Last seen: 17 years 2 months ago
CSV Exporting is done based upon a strict algorithm. Using features like page headers etc. are not really recommended when exporting to CSV. A good article to outline some best practices for CSV exporting is...

Robin's picture
Joined: Aug 4 2006 - 3:46am
Last seen: 17 years 2 months ago

Check the supplied /demo/samples/nopagebreak sample.
Note that there is also a built-in fill time parameter called IS_IGNORE_PAGINATION that when turned to Boolean.TRUE will cause the engine to ignore the page height and all the page break related settings in JRXML to produce a document with a single very large page.

I hope this helps.
teodord's picture
Joined: Jun 30 2006 - 9:00am
Last seen: 1 day 8 hours ago
its great to get the answer from the admin.
Thanks Teodord.
i can very well use IS_IGNORE_PAGINATION boolean variable in jrxml,but at the same time i have to show the user only 20 rows.So i have to go for pagination and when exporting to CSV or any other format the field name should not be repeated.i think only any one of the two could be done,both cannot be done simultaneoulsy am i right?
Post edited by: Kannan_S, at: 2006/10/04 06:35
Kannan_S's picture
Joined: Jul 24 2006 - 4:05pm
Last seen: 17 years 2 months ago