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
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
5 Answers:
Posted on October 3, 2006 at 7:19am
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.
Regards,
Lucian
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.
Regards,
Lucian
Posted on October 3, 2006 at 8:28am
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?
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?
Posted on October 3, 2006 at 11:59am
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...
http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ9
hth,
Robin
http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ9
hth,
Robin
Posted on October 3, 2006 at 4:00pm
Hi,
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.
Teodor
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.
Teodor
Posted on October 4, 2006 at 6:31am
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
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