dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09682
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2616: Added total row in orgunit distribution report
------------------------------------------------------------
revno: 2616
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-01-18 11:39:31 +0100
message:
Added total row in orgunit distribution report
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.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-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java 2011-01-14 16:14:22 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java 2011-01-18 10:39:31 +0000
@@ -122,6 +122,11 @@
Collections.sort( units, ORGUNIT_COMPARATOR );
Collections.sort( groups, ORGUNIT_GROUP_COMPARATOR );
+ if ( !organisationUnitOnly )
+ {
+ units.add( organisationUnit ); // Add parent itself to the end to get the total
+ }
+
grid.addHeader( new GridHeader( FIRST_COLUMN_TEXT, FIRST_COLUMN_TEXT, null, false, true ) );
for ( OrganisationUnitGroup group : groups )