dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19943
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8916: Removed none column from org unit report
------------------------------------------------------------
revno: 8916
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-11-06 19:50:13 +0300
message:
Removed none column from org unit 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 2012-03-01 11:38:41 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java 2012-11-06 16:50:13 +0000
@@ -60,7 +60,6 @@
{
private static final String TITLE_SEP = " - ";
private static final String FIRST_COLUMN_TEXT = "Organisation unit";
- private static final String HEADER_NONE = "None";
private static final String HEADER_TOTAL = "Total";
// -------------------------------------------------------------------------
@@ -131,11 +130,8 @@
grid.addHeader( new GridHeader( group.getName(), false, false ) );
}
- grid.addHeader( new GridHeader( HEADER_NONE, false, false ) );
grid.addHeader( new GridHeader( HEADER_TOTAL, false, false ) );
- boolean hasNone = false;
-
for ( OrganisationUnit unit : units )
{
grid.addRow();
@@ -155,22 +151,8 @@
totalGroup += count;
}
-
- int total = subTree != null ? subTree.size() : 0;
- int none = total - totalGroup;
- grid.addValue( none );
- grid.addValue( totalGroup );
-
- if ( none > 0 )
- {
- hasNone = true;
- }
- }
-
- if ( !hasNone )
- {
- grid.removeColumn( grid.getWidth() - 2 ); // None column
+ grid.addValue( totalGroup );
}
return grid;