[#5905] - Added property for summary rows position in xls/xlsx document

Category:
Bug report
Priority:
Normal
Status:
Assigned
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
I have added property for summary rows position in xls/xlsx document. It can be above or below in Excel. So I added the following code. File JRXlsAbstractExporter.java: On top, where properties are defined (sting code 344 in attached file): /** * Property prefix used to set position of summary rows. By default summary rows are above details. * Setting this property to true instructs the exporter to set summary rows below details. * The default value is false. */ public static final String PROPERTY_SUMMARY_ROWS_BELOW_DETAILS = JRPropertiesUtil.PROPERTY_PREFIX + "export.xls.summary.rows.below.details"; In the end of function protected void setParameters() (sting code 841 in attached file): summaryRowsBelowDetails = summaryRowsBelowDetails == null ? getPropertiesUtil().getBooleanProperty(jasperPrint, PROPERTY_SUMMARY_ROWS_BELOW_DETAILS, false) : summaryRowsBelowDetails; In section where property setters are defined (sting code 1811 in attached file): public boolean isSummaryRowsBelowDetails() { return summaryRowsBelowDetails; } public void setSummaryRowsBelowDetails(boolean summaryRowsBelowDetails) { this.summaryRowsBelowDetails = summaryRowsBelowDetails; } File JRXlsExporter.java: In function protected void setRowLevels(XlsRowLevelInfo levelInfo, String level) (sting code 1934 in attached file): sheet.setRowSumsBelow(isSummaryRowsBelowDetails()); File XlsxSheetHelper.java: In function public void exportHeader(int scale, int rowFreeze, int columnFreeze, JasperPrint jasperPrint) (stings of code 118, 120 in attached file): int isSummaryRowsBelowDetails = new Boolean(propertiesUtil.getProperty(jasperPrint, JRXlsAbstractExporter.PROPERTY_SUMMARY_ROWS_BELOW_DETAILS)) == true ? 1:0; write("" + fitToPage + "
romadenysyuk's picture
Joined: Sep 10 2012 - 6:09am
Last seen: 9 years 11 months ago

1 Comment:

#1
  • Status:New» Assigned
  • Assigned:teodord» shertage
Feedback