Start Excel Export from 16th row - Table output or Grid output created using Detail band

Hi Folks,

Did anybody try exporting a grid report starting from any custom row number ? Is it possible ?

Thank you in Advance.

 

sadakar's picture
5125
Joined: Aug 14 2012 - 3:57am
Last seen: 1 week 2 days ago

2 Answers:

Just set the datasource to return from row 16. If you need to export something different from what's displayed in your report, create a new report.

hozawa's picture
190501
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

Hi,

This output could be obtained based on print when expressions for elements in the detail band and exporter filter by key properties.

If you need to print out rows starting from 16, for each element in the detail band you need to place 2 textfields: one having the print when expression $V{REPORT_COUNT} < 16 and key="test" setting, the other having the print when expression $V{REPORT_COUNT} > 15 and no key attribute set.

Add these properties in the JRXML file:

    <property name="net.sf.jasperreports.export.xls.exclude.key.test"/>
    <property name="net.sf.jasperreports.export.xlsx.exclude.key.test"/>

Also, the net.sf.jasperreports.export.xls.remove.empty.space.between.rows property should be set in order to remove the empty rows which are generated instead.

I hope this helps,

Sanda

shertage's picture
22224
Joined: Sep 26 2006 - 8:06pm
Last seen: 2 months 3 weeks ago
Feedback
randomness