← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1724: Excel Reporting module:

 

------------------------------------------------------------
revno: 1724
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-04-02 10:30:02 +0700
message:
  Excel Reporting module:
  - Removed the header of excel file when printing out.
  - Changed background and font colour also to get more clearly.
modified:
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/action/GenerateReportSupport.java
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.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/export/action/GenerateReportSupport.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/action/GenerateReportSupport.java	2010-03-31 04:48:57 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/export/action/GenerateReportSupport.java	2010-04-02 03:30:02 +0000
@@ -294,8 +294,6 @@
     // Excel format
     // ------------------------------------------
 
-    protected HSSFHeader header;
-
     protected DataFormat dFormat;
 
     protected Font csFont;
@@ -306,8 +304,6 @@
 
     protected Font csFont12BoldCenter;
 
-    protected CellStyle csHeader;
-
     protected CellStyle csNumber;
 
     protected CellStyle csFormula;
@@ -330,13 +326,11 @@
         throws Exception
     {
         sheetPOI = templateWorkbook.getSheetAt( 0 );
-        header = (HSSFHeader) sheetPOI.getHeader();
         csFont = templateWorkbook.createFont();
         csFont10Bold = templateWorkbook.createFont();
         csFont11Bold = templateWorkbook.createFont();
         csFont12BoldCenter = templateWorkbook.createFont();
         dFormat = templateWorkbook.createDataFormat();
-        csHeader = templateWorkbook.createCellStyle();
         csNumber = templateWorkbook.createCellStyle();
         csFormula = templateWorkbook.createCellStyle();
         csText = templateWorkbook.createCellStyle();
@@ -356,7 +350,6 @@
     protected void installDefaultExcelFormat()
         throws Exception
     {
-        initPOIStylesManager.initDefaultHeader( header );
         initPOIStylesManager.initDefaultFont( csFont );
         initPOIStylesManager.initDefaultCellStyle( csText, csFont );
 

=== modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java	2010-01-26 07:04:17 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/manager/DefaultInitializePOIStylesManager.java	2010-04-02 03:30:02 +0000
@@ -61,11 +61,11 @@
 
     private static final short STYLE_DEFAULT_BORDER = CellStyle.BORDER_THIN;
 
-    private static final short STYLE_DEFAULT_FONT_COLOR = IndexedColors.DARK_YELLOW.getIndex();
+    private static final short STYLE_DEFAULT_FONT_COLOR = IndexedColors.BROWN.getIndex();
 
     private static final short STYLE_DEFAULT_BACK_FORE_GROUND_COLOR = IndexedColors.WHITE.getIndex();
 
-    private static final short STYLE_DEFAULT_BORDER_COLOR = IndexedColors.LIGHT_ORANGE.getIndex();
+    private static final short STYLE_DEFAULT_BORDER_COLOR = IndexedColors.DARK_BLUE.getIndex();
 
     /***************************************************************************
      * Default Methods - Using for XLS Extension
@@ -74,11 +74,10 @@
     @SuppressWarnings( "static-access" )
     public void initDefaultHeader( HSSFHeader test_header )
     {
-
         test_header.setCenter( this.STYLE_DEFAULT_TITLE_CENTER );
         test_header.setLeft( this.STYLE_DEFAULT_TITLE_LEFT );
         test_header.setRight( this.STYLE_DEFAULT_TITLE_RIGHT );
-
+        
     }
 
     @SuppressWarnings( "static-access" )
@@ -88,6 +87,7 @@
         test_font.setFontHeightInPoints( this.STYLE_DEFAULT_FONT_HEIGHT );
         test_font.setBoldweight( this.STYLE_DEFAULT_FONT_WEIGHT );
         test_font.setColor( this.STYLE_DEFAULT_FONT_COLOR );
+        
     }
 
     @SuppressWarnings( "static-access" )