← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17335: Analytics, minor code improvement

 

------------------------------------------------------------
revno: 17335
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-11-02 16:38:37 -0500
message:
  Analytics, minor code improvement
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.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-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2014-10-27 18:50:54 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2014-11-02 21:38:37 +0000
@@ -529,9 +529,11 @@
     @Override
     public Grid getAggregatedDataValues( DataQueryParams params, boolean tableLayout, List<String> columns, List<String> rows )
     {
+        Grid grid = getAggregatedDataValues( params );
+        
         if ( !tableLayout )
         {
-            return getAggregatedDataValues( params );
+            return grid;
         }
 
         ListUtils.removeEmptys( columns );
@@ -574,8 +576,6 @@
         reportTable.setHideEmptyRows( params.isHideEmptyRows() );
         reportTable.setShowHierarchy( params.isShowHierarchy() );
 
-        Grid grid = getAggregatedDataValues( params );
-
         Map<String, Double> valueMap = getAggregatedDataValueMapping( grid );
         
         return reportTable.getGrid( new ListGrid( grid.getMetaData() ), valueMap, false );