Category: | Feature request |
Priority: | Urgent |
Status: | Assigned |
Project: | Severity: | Major |
Resolution: | Reopened |
|
Component: | Reproducibility: | N/A |
Assigned to: |
REQUIREMENT 1:
While exporting the report to Excel format, we require the
Report headers needs to be displayed only on print preview and it should come only on printing the report.
In normal view it should not print the headers.
There is an option in POI to do this like,
HSSFHeader header = sheet.getHeader();
header.setCenter("XXX"); header.setLeft("YYY"); header.setRight("ZZZ");
expecting the similar property in jasper report tool iReport.
REQUIREMENT 2:
POI provides a way to protect the spreadsheet,
like HSSFSheet.protectSheet
similarly expecting a way to lock the spreadsheet to protect the data from being edited by user.
Note:
We need atleast a workaround for this.
4 Comments:
The requirement no. 2 is already available for the Apache POI exporter.
In order to protect sheets you have either to set the JExcelApiExporterParameter.PASSWORD export parameter, or to set the net.sf.jasperreports.export.xls.password exporter hint within the jrxml file ( see here: http://jasperforge.org/uploads/publish/jasperreportswebsite/trunk/config... ).
For the requirement no. 1 we'll try to find a solution.
HTH,
sanda zaharia
Concerning the req. no. 1:
the following custom properties at global/report level were added:
net.sf.jasperreports.export.xls.sheet.header.left
net.sf.jasperreports.export.xls.sheet.header.center
net.sf.jasperreports.export.xls.sheet.header.right
net.sf.jasperreports.export.xls.sheet.footer.left
net.sf.jasperreports.export.xls.sheet.footer.center
net.sf.jasperreports.export.xls.sheet.footer.right
One can use these properties to set the text content of left, center and right sides in the sheet header and/or footer.
Sources were committed on svn revision 3951.
This fix is not working for Excel-2007 i.e. JRXlsxExporter