← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11152: Add filter data infor in grid header of aggregate tabular report.

 

------------------------------------------------------------
revno: 11152
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-06-06 12:48:27 +0700
message:
  Add filter data infor in grid header of aggregate tabular report.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.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-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-06-06 05:33:02 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2013-06-06 05:48:27 +0000
@@ -510,17 +510,14 @@
         }
 
         // Filter is only one orgunit
+        
+       
         if ( position == PatientAggregateReport.POSITION_ROW_PERIOD_COLUMN_DATA )
         {
             String orgunitName = organisationUnitService.getOrganisationUnit( orgunitIds.iterator().next() )
                 .getDisplayName();
-
-            String filterDataDes = getFilterDataDescription( deFilters );
-            if ( !filterDataDes.isEmpty() )
-            {
-                filterDataDes = "; " + i18n.getString( "data_filter" ) + ": " + filterDataDes;
-            }
-            grid.setSubtitle( subTitle + i18n.getString( "orgunit" ) + ": " + orgunitName + filterDataDes );
+            
+            grid.setSubtitle( subTitle + i18n.getString( "orgunit" ) + ": " + orgunitName );
         }
         // Filter is only one period
         else if ( position == PatientAggregateReport.POSITION_ROW_ORGUNIT
@@ -541,14 +538,8 @@
                 String endDate = format.formatDate( period.getEndDate() );
                 periodName += startDate + " -> " + endDate;
             }
-
-            String filterDataDes = getFilterDataDescription( deFilters );
-            if ( !filterDataDes.isEmpty() )
-            {
-                filterDataDes = "; " + i18n.getString( "data_filter" ) + ": " + filterDataDes;
-            }
-
-            grid.setSubtitle( subTitle + i18n.getString( "period" ) + ": " + periodName + filterDataDes );
+            
+            grid.setSubtitle( subTitle + i18n.getString( "period" ) + ": " + periodName );
         }
         else
         {
@@ -582,20 +573,12 @@
             }
 
             // Data filter description
-            String filterDataDes = "";
-            if ( position == PatientAggregateReport.POSITION_ROW_ORGUNIT_COLUMN_PERIOD
-                || position == PatientAggregateReport.POSITION_ROW_PERIOD_COLUMN_ORGUNIT
-                || position == PatientAggregateReport.POSITION_ROW_ORGUNIT_ROW_PERIOD
-                || position == PatientAggregateReport.POSITION_ROW_PERIOD
-                || position == PatientAggregateReport.POSITION_ROW_ORGUNIT )
+            String filterDataDes = getFilterDataDescription( deFilters );
+            if ( !filterDataDes.isEmpty() )
             {
-                filterDataDes = getFilterDataDescription( deFilters );
-                if ( !filterDataDes.isEmpty() )
-                {
-                    filterDataDes = i18n.getString( "data_filter" ) + ": " + filterDataDes + "; ";
-                }
+                filterDataDes = "; " + i18n.getString( "data_filter" ) + ": " + filterDataDes;
             }
-
+            
             subTitle += filterOrgunitDes + filterPeriodDes + filterDataDes;
             if ( subTitle.isEmpty() )
             {
@@ -607,6 +590,8 @@
             }
         }
 
+        
+        
         // ---------------------------------------------------------------------
         // Get SQL and build grid
         // ---------------------------------------------------------------------