← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1918: Fixed srno in drilldowncasedbased

 

------------------------------------------------------------
revno: 1918
committer: Namrata
branch nick: trunk
timestamp: Wed 2010-08-11 16:08:04 +0530
message:
  Fixed srno in drilldowncasedbased
modified:
  local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateDrillDownResultAction.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 'local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateDrillDownResultAction.java'
--- local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateDrillDownResultAction.java	2010-08-09 05:27:55 +0000
+++ local/in/dhis-web-dashboard/src/main/java/org/hisp/dhis/dashboard/ga/action/charts/GenerateDrillDownResultAction.java	2010-08-11 10:38:04 +0000
@@ -266,7 +266,7 @@
         wCellformat1.setAlignment( Alignment.CENTRE );
         wCellformat1.setVerticalAlignment( VerticalAlignment.CENTRE );
         wCellformat1.setWrap( true );
-        wCellformat1.setBackground( Colour.GRAY_25 );
+        wCellformat1.setBackground( Colour.GREY_40_PERCENT );
 
         // <editor-fold defaultstate="collapsed" desc="adding column names">
         int count1 = 0;
@@ -277,10 +277,19 @@
             count1++;
         }
         sheet0.addCell( new Label( 7 + count1, 1, "Execution Date", wCellformat1 ) );
+
+        for( int i=levelsList.size()-1;i>=0;i-- )
+        {
+            int level = levelsList.get(i);
+            count1++;
+            sheet0.addCell( new Label(7+count1 , 1, organisationUnitService.getOrganisationUnitLevelByLevel(level).getName(), wCellformat1 ) );
+        }
+
         // </editor-fold>
 
         
         int rowNo = rowList.get( 0 );
+        int srno = 0;
         // <editor-fold defaultstate="collapsed" desc="For loop of orgUnitDataList">
         for ( OrganisationUnit ou : orgUnitDataList ) {
             List<PatientDataValue> pdvList = ouPatientDataValueMap.get( ou );
@@ -371,7 +380,7 @@
                         // <editor-fold defaultstate="collapsed" desc="stype = srno">
                         if ( sType.equalsIgnoreCase( "srno" ) )
                         {
-                            int tempNum = 1 + rowCount;
+                            int tempNum = 1 + srno;
                             tempStr = String.valueOf( tempNum );
                         }
                         // </editor-fold>
@@ -421,6 +430,7 @@
                 }
                 // </editor-fold>
                 rowNo++;
+                srno++;
             }
             // </editor-fold>
         }