← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1090: Minor fix.

 

------------------------------------------------------------
revno: 1090
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Mon 2009-11-23 16:49:19 +0100
message:
  Minor fix.
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateCustomDataSetReportAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDefaultDataSetReportAction.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/reporttable/impl/DefaultReportTableService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2009-11-23 15:39:31 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java	2009-11-23 15:49:19 +0000
@@ -44,7 +44,6 @@
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.completeness.DataSetCompletenessService;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOption;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.datamart.DataMartService;
 import org.hisp.dhis.datamart.DataMartStore;

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateCustomDataSetReportAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateCustomDataSetReportAction.java	2009-11-07 14:09:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateCustomDataSetReportAction.java	2009-11-23 15:49:19 +0000
@@ -162,7 +162,7 @@
                     
                     if ( dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) )
                     {
-                    	double aggregatedValue;
+                    	Double aggregatedValue;
                     	
                     	if ( selectedUnitOnly != null )
                     	{                        		
@@ -172,7 +172,7 @@
                     	else
                     	{                        		
                     	    aggregatedValue = dataMartStore.getAggregatedValue( dataElement, optionCombo, period, orgUnit );                    		
-                    	    value = ( aggregatedValue != DataMartStore.NO_VALUES_REGISTERED ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";                      		                    		
+                    	    value = ( aggregatedValue != null ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";                      		                    		
                     	}                 
                                  
                         aggregatedDataValueMap.put(dataElement.getId() + ":" + optionCombo.getId(), value );

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDefaultDataSetReportAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDefaultDataSetReportAction.java	2009-11-07 14:09:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/dataset/action/GenerateDefaultDataSetReportAction.java	2009-11-23 15:49:19 +0000
@@ -294,7 +294,7 @@
 
                         if ( dataElement.getType().equals( DataElement.VALUE_TYPE_INT ) )
                         {
-                            double aggregatedValue;
+                            Double aggregatedValue;
                         	
                             if ( selectedUnitOnly != null )
                             {                            		
@@ -306,7 +306,7 @@
                             {                            		
                                 aggregatedValue = dataMartStore.getAggregatedValue( dataElement, optionCombo, period, orgUnit );		
                         		
-                                value = ( aggregatedValue != DataMartStore.NO_VALUES_REGISTERED ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";                    		                    		
+                                value = ( aggregatedValue != null ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";                    		                    		
                             }         
                         }
                         else
@@ -372,7 +372,7 @@
                     if ( dataElementService.getDataElement( reportElement.getElementId() ).getType().equals(
                         DataElement.VALUE_TYPE_INT ) )
                     {
-                    	double aggregatedValue;
+                    	Double aggregatedValue;
                     	
                     	if( selectedUnitOnly != null )
                     	{                        		
@@ -388,7 +388,7 @@
                     	    dataElementService.getDataElement(reportElement.getElementId()), 
                     	    dataElements.iterator().next().getCategoryCombo().getOptionCombos().iterator().next(), period, orgUnit);                   		
                     		
-                    	    value = ( aggregatedValue != DataMartStore.NO_VALUES_REGISTERED ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";
+                    	    value = ( aggregatedValue != null ) ? NumberUtils.formatDataValue( aggregatedValue ) : "";
                     	}                       	                    
                     }