dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02634
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 894: Not printing the value of ZERO when previewing on web
------------------------------------------------------------
revno: 894
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-10-21 13:52:27 +0700
message:
Not printing the value of ZERO when previewing on web
modified:
dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLStructureResponse.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLStructureResponse.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLStructureResponse.java 2009-10-07 10:20:08 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/XMLStructureResponse.java 2009-10-21 06:52:27 +0000
@@ -89,6 +89,8 @@
private static final String MERGEDCELL_CLOSETAG = "</MergedCells>";
private static final String PRINT_END_LINE = "\n";
+
+ public static final String NUMBER_OF_ZERO = "0";
// ------------------------------------------------
// Get & Set methods //
@@ -328,7 +330,13 @@
}
else
{
- STRUCTURE_DATA_RESPONSE.append( "<![CDATA[" + cell[j].getContents() + "]]>" );
+ if ( cell[j].getContents().equals( NUMBER_OF_ZERO ) ) {
+
+ STRUCTURE_DATA_RESPONSE.append( "<![CDATA[-]]>" );
+ }
+ else {
+ STRUCTURE_DATA_RESPONSE.append( "<![CDATA[" + cell[j].getContents() + "]]>" );
+ }
}
STRUCTURE_DATA_RESPONSE.append( "</data>" );
@@ -445,7 +453,7 @@
private void writeBySheetNo( int sheetNo )
{
Sheet sheet = WORKBOOK.getSheet( sheetNo );
- Range[]aMergedCell = sheet.getMergedCells();
+ Range[] aMergedCell = sheet.getMergedCells();
int iColTopLeft = 0;
int iRowTopLeft = 0;
@@ -481,4 +489,5 @@
return s;
}
}
+
}