← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2408: Bug Fixed in Routine Report for BanglaDesh and change orgUnit Selection in Report management file

 

------------------------------------------------------------
revno: 2408
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-12-22 12:59:08 +0530
message:
  Bug Fixed in Routine Report for BanglaDesh and change orgUnit Selection in Report management file
modified:
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetOrgUnitsAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetReportsAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GetOrgUnitNameAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserFormAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java
  local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-reports-national/src/main/resources/struts.xml
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/benificiaryInfoReportsForm.vm
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForDataSetLockReports.vm
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForRoutineReport.vm
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ougUnitName.vm


--
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 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java	2010-12-03 13:29:28 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/AddUserAction.java	2010-12-22 07:29:08 +0000
@@ -9,7 +9,6 @@
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.security.PasswordManager;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserAuthorityGroup;
@@ -38,14 +37,14 @@
     {
         this.passwordManager = passwordManager;
     }
-
+/*
     private OrganisationUnitService organisationUnitService;
 
     public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
     {
         this.organisationUnitService = organisationUnitService;
     }
-
+*/
     private OrganisationUnitGroupService organisationUnitGroupService;
     
     public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
@@ -66,7 +65,7 @@
         String surname = "NRHM";
         String firstName = "HMIS";
 
-        int userRoles[] = { 0, 1, 1, 3, 4, 6, 5 };
+       // int userRoles[] = { 0, 1, 1, 3, 4, 6, 5 };
 //        int orgUnitLevels = organisationUnitService.getNumberOfOrganisationalLevels();
         //for ( int i = 4; i <= 4; i++ )
         {

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetOrgUnitsAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetOrgUnitsAction.java	2010-11-01 11:14:31 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetOrgUnitsAction.java	2010-12-22 07:29:08 +0000
@@ -55,6 +55,9 @@
         {
             orgUnit = organisationUnitService.getOrganisationUnit( orgUnitId );
             ouLevel = "" + organisationUnitService.getLevelOfOrganisationUnit( orgUnit );
+            
+            System.out.println( " Org Short name : " + orgUnit.getShortName() + ", level is : " + ouLevel );
+            
         }
 
         return SUCCESS;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetReportsAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetReportsAction.java	2010-11-01 11:14:31 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/action/GetReportsAction.java	2010-12-22 07:29:08 +0000
@@ -58,13 +58,21 @@
         this.ouId = ouId;
     }
 
+    private String reportType;
+    
+    
+    public void setReportType( String reportType )
+    {
+        this.reportType = reportType;
+    }
+/*
     private String reportTypeName;
 
     public void setReportTypeName( String reportTypeName )
     {
         this.reportTypeName = reportTypeName;
     }
-
+*/
     private List<Report_in> reportList;
 
     public List<Report_in> getReportList()
@@ -95,9 +103,12 @@
                 ouName = orgUnit.getShortName();
 
                 PeriodType periodTypeObj = periodService.getPeriodTypeByName( periodType );
-
+                
+                System.out.println( "report type  : " + reportType  + " ,Period Type :" + periodTypeObj.getName() + " ,org Unit :"  + ouName );
+                
                 reportList = new ArrayList<Report_in>( reportService.getReportsByPeriodSourceAndReportType(
-                    periodTypeObj, orgUnit, reportTypeName ) );
+                    periodTypeObj, orgUnit, reportType ) );
+                System.out.println( "Size of Reports List : " + reportList.size() );
             }
             catch ( Exception e )
             {

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GetOrgUnitNameAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GetOrgUnitNameAction.java	2010-07-19 08:20:14 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/datasetlock/action/GetOrgUnitNameAction.java	2010-12-22 07:29:08 +0000
@@ -22,12 +22,19 @@
     // -------------------------------------------------------------------------
     // Input/Output
     // -------------------------------------------------------------------------
-    private Integer selectedOrgUnitId;
+    private String selectedOrgUnitId;
     
-    public void setSelectedOrgUnitId(Integer selectedOrgUnitId)
+    public void setSelectedOrgUnitId( String selectedOrgUnitId )
     {
         this.selectedOrgUnitId = selectedOrgUnitId;
     }
+    
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
 
     private OrganisationUnit organisationUnit;
 
@@ -41,7 +48,15 @@
 
     public String execute()
     {
-        organisationUnit = organisationUnitService.getOrganisationUnit( selectedOrgUnitId.intValue() );
+       
+        System.out.println( "orgUnit Id is "  + id );
+        organisationUnit = organisationUnitService.getOrganisationUnit( id );
+       // organisationUnit = organisationUnitService.getOrganisationUnit( Integer.parseInt( selectedOrgUnitId ) );
+       // organisationUnit = organisationUnitService.getOrganisationUnit( selectedOrgUnitId.intValue() );
+        
+        System.out.println( "orgUnit Id is "  + selectedOrgUnitId + " , orgNunit name is : " + organisationUnit.getName() );
+        
+        //Integer.parseInt( year );
        
         return SUCCESS;
     }

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserFormAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserFormAction.java	2010-11-08 06:10:18 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserFormAction.java	2010-12-22 07:29:08 +0000
@@ -77,7 +77,7 @@
         {
             PeriodType type = periodTypeIterator.next();
             
-            if( type.getName().equalsIgnoreCase("Monthly") || type.getName().equalsIgnoreCase("quarterly") || type.getName().equalsIgnoreCase("yearly") )
+            if( type.getName().equalsIgnoreCase("Monthly") || type.getName().equalsIgnoreCase("quarterly") || type.getName().equalsIgnoreCase("yearly") || type.getName().equalsIgnoreCase("Daily") )
             {
             }
             else

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java	2010-11-08 06:10:18 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/routine/action/GenerateRoutineReportAnalyserResultAction.java	2010-12-22 07:29:08 +0000
@@ -202,7 +202,10 @@
         deCodesXMLFileName = selReportObj.getXmlTemplateName();
         reportModelTB = selReportObj.getModel();
         reportFileNameTB = selReportObj.getExcelTemplateName();
-
+        
+        System.out.println( "Report name is : " + selReportObj.getName()+ " , Report Model is  " + selReportObj.getModel() + " , Excel template name is : " + selReportObj.getExcelTemplateName() );
+        System.out.println( " , Report XML file  is : " + selReportObj.getXmlTemplateName()+ " , Report Type is :  " + selReportObj.getReportType() );
+        
         String inputTemplatePath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator
             + "template" + File.separator + reportFileNameTB;
         String outputReportPath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator
@@ -215,6 +218,7 @@
             Collections.sort( orgUnitList, new OrganisationUnitNameComparator() );
         }
         else if( reportModelTB.equalsIgnoreCase( "dynamicwithrootfacility" ) )
+        //else if( reportModelTB.equalsIgnoreCase( "dynamicwithroot" ) )
         {
             OrganisationUnit orgUnit = organisationUnitService.getOrganisationUnit( ouIDTB );
             orgUnitList = new ArrayList<OrganisationUnit>( orgUnit.getChildren() );
@@ -222,6 +226,8 @@
             orgUnitList.add( orgUnit );
 
             parentUnit = orgUnit.getName();
+            
+            System.out.println( " orgUnitList size is  : " + orgUnitList.size()+ " , Parent orgUnit is  : " + orgUnit.getName() );
         }
         else if( reportModelTB.equalsIgnoreCase( "STATIC" ) || reportModelTB.equalsIgnoreCase( "STATIC-DATAELEMENTS" ) || reportModelTB.equalsIgnoreCase( "STATIC-FINANCIAL" ) )
         {
@@ -696,26 +702,34 @@
                 {
                     if ( sType.equalsIgnoreCase( "dataelement" ) )
                     {
-                        if ( organisationUnitGroupId.equals( "ALL" ) )
+                        if ( organisationUnitGroupId.equalsIgnoreCase( "ALL" ) )
                         {
+                           // System.out.println( "Inside organisation Unit Group " + organisationUnitGroupId );
+                            //System.out.println( tempStr + ":" + deCodeString + ",start date:" + tempStartDate.getTime() + " ,end date :" + tempEndDate.getTime() + " , org unit :" + currentOrgUnit + " , report model: " + reportModelTB );
                             tempStr = reportService.getResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), currentOrgUnit, reportModelTB );
+                           // System.out.println( tempStr );
                         }
-                        else if ( organisationUnitGroupId.equals( "Selected_Only" ) )
+                        else if ( organisationUnitGroupId.equalsIgnoreCase( "Selected_Only" ) )
                         {
+                            //System.out.println( "Inside organisation Unit Group " + organisationUnitGroupId );
                             tempStr = reportService.getIndividualResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), currentOrgUnit, reportModelTB );
                         }
                         else
                         {
                             OrganisationUnitGroup orgUnitGroup = organisationUnitGroupService.getOrganisationUnitGroup( Integer.parseInt( organisationUnitGroupId ) );
-
+                            
+                            //System.out.println( "Inside organisation Unit Group " + orgUnitGroup.getName() );
                             List<OrganisationUnit> orgGroupMembers = new ArrayList<OrganisationUnit>( orgUnitGroup.getMembers() );
-
+                            //System.out.println( "Size of  Group member :  " + orgGroupMembers.size() );
+                            
                             List<OrganisationUnit> orgUnitList = new ArrayList<OrganisationUnit>( organisationUnitService.getOrganisationUnitWithChildren( ouIDTB ) );
-
+                            
+                            //System.out.println( "Size of  Child member :  " + orgUnitList.size() );
                             orgGroupMembers.retainAll( orgUnitList );
-
-                            double temp = 0;
-                            double value = 0;
+                            //System.out.println( "Size of  member after retain :  " + orgGroupMembers.size() );
+                            
+                            double temp = 0.0;
+                            double value = 0.0;
                             for ( OrganisationUnit unit : orgGroupMembers )
                             {
                                 tempStr = reportService.getResultDataValue( deCodeString, tempStartDate.getTime(), tempEndDate.getTime(), unit, reportModelTB );
@@ -734,6 +748,7 @@
 
                             tempNum = temp;
                             tempStr = String.valueOf( (int) temp );
+                            //System.out.println( tempStr );
                         }
                     }
                     else if ( sType.equalsIgnoreCase( "dataelement-boolean" ) )
@@ -764,11 +779,12 @@
                 int tempColNo = report_inDesign.getColno();
                 int sheetNo = report_inDesign.getSheetno();
                 WritableSheet sheet0 = outputReportWorkbook.getSheet( sheetNo );
-                
+               
                 if ( tempStr == null || tempStr.equals( " " ) )
                 {
-                    tempColNo += orgUnitCount;
-
+                    //tempColNo += orgUnitCount;
+                    tempRowNo += orgUnitCount;
+                    
                     WritableCellFormat wCellformat = new WritableCellFormat();
                     wCellformat.setBorder( Border.ALL, BorderLineStyle.THIN );
                     wCellformat.setWrap( true );
@@ -776,7 +792,8 @@
 
                     sheet0.addCell( new Blank( tempColNo, tempRowNo, wCellformat ) );
                 }
-                else
+               else 
+               // if ( tempStr != null || tempStr != " " )
                 {
                     if ( reportModelTB.equalsIgnoreCase( "DYNAMIC-ORGUNIT" ) )
                     {
@@ -816,6 +833,7 @@
                         }
                     }
                     else if ( reportModelTB.equalsIgnoreCase( "dynamicwithrootfacility" ) )
+                    //else if ( reportModelTB.equalsIgnoreCase( "dynamicwithroot" ) )    
                     {
                         if ( deCodeString.equalsIgnoreCase( "FACILITYP" )
                             || deCodeString.equalsIgnoreCase( "FACILITY-NOREPEAT" )

=== modified file 'local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml'
--- local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml	2010-12-03 13:29:28 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml	2010-12-22 07:29:08 +0000
@@ -1318,9 +1318,9 @@
 		<property name="passwordManager">
 			<ref bean="org.hisp.dhis.security.PasswordManager"/>
 		</property>
-		<property name="organisationUnitService">
+<!--		<property name="organisationUnitService">
 			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-		</property>
+		</property>-->
         <property name="organisationUnitGroupService">
             <ref bean="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
         </property>

=== modified file 'local/in/dhis-web-reports-national/src/main/resources/struts.xml'
--- local/in/dhis-web-reports-national/src/main/resources/struts.xml	2010-11-02 09:31:44 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/struts.xml	2010-12-22 07:29:08 +0000
@@ -147,8 +147,7 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="menu">/dhis-web-reports/menu.vm</param>
 			<param name="page">/dhis-web-reports/reportAssociations.vm</param>
-			<param name="javascripts">
-				../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js</param>
+			<param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js</param>
 		</action>
 		<!-- Chain for Associations end-->
 		
@@ -170,8 +169,7 @@
 				/dhis-web-reports/routineReportAnalysisFront.vm</param>
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForRoutineReport.vm</param>
-			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -336,7 +334,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForAggregationReport.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -362,7 +360,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForFeedback.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -386,7 +384,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForGOIReports.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -405,12 +403,9 @@
 		<action name="dataSetLockReportAnalyser"
 			class="org.hisp.dhis.reports.datasetlock.action.GenerateDataSetLockReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/dataSetLockReportAnalysisFront.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForDataSetLockReports.vm</param>
-			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js, javascript/datasetLockReport.js,javascript/hashtable.js</param>
+			<param name="page">/dhis-web-reports/dataSetLockReportAnalysisFront.vm</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForDataSetLockReports.vm</param>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,javascript/datasetLockReport.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -427,8 +422,7 @@
 		
 		<action name="getOrgUnitName"
 			class="org.hisp.dhis.reports.datasetlock.action.GetOrgUnitNameAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/ougUnitName.vm</result>
+			<result name="success" type="velocity-xml">/dhis-web-reports/ougUnitName.vm</result>
 		</action>
 		<action name="getPeriodsForLock"
 			class="org.hisp.dhis.reports.datasetlock.action.GetPeriodsForLockAction">
@@ -453,7 +447,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForLineListingReport.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -477,7 +471,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForPeriodWiseProgressReport.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -501,7 +495,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForOuWiseProgress.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/lists.js,javascript/reports.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/lists.js,javascript/reportManagement.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -545,7 +539,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForAdvanced.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js
 				,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
 				,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
@@ -570,7 +564,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForNLEPReports.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -592,7 +586,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForMalaryaReports.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -682,7 +676,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForTwentyPoint.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -705,7 +699,7 @@
 				/dhis-web-reports/OrgunitGroupsetReportForm.vm</param>
 			<param name="menu">/dhis-web-reports/menu.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -728,7 +722,7 @@
 			<param name="menu">
 				/dhis-web-reports/menuWithTreeForRankingReport.vm</param>
 			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -749,8 +743,7 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/welcome.vm</param>
 			<param name="menu">/dhis-web-reports/menu.vm</param>
-			<param name="javascripts">
-				../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+			<param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
@@ -774,10 +767,9 @@
 		
 		<action name="getReports"
 			class="org.hisp.dhis.reports.action.GetReportsAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responseReport.vm</result>
-			<param name="javascripts">
-				../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+			<result name="success" type="velocity-xml">/dhis-web-reports/responseReport.vm</result>
+			<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
+	<!--	<param name="javascripts">../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>-->
 			<!--<interceptor-ref name="transactionStack"/>-->
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
@@ -1146,7 +1138,7 @@
             <param name="menu">
                 /dhis-web-reports/menuWithphysicaOutputReports.vm</param>
             <param name="javascripts">
-                ../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reports.js,javascript/hashtable.js</param>
+                ../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/lists/lists.js,javascript/reportManagement.js,javascript/hashtable.js</param>
             <param name="stylesheets">css/StylesForTags.css</param>
             <interceptor-ref name="organisationUnitTreeStack"/>
         </action>
@@ -1167,7 +1159,7 @@
             <param name="page">/dhis-web-reports/csReviewReportFront.vm</param>
             <param name="menu">
                 /dhis-web-reports/menuWithTreeForCSReviewReport.vm</param>
-            <param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/lists.js,javascript/reports.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+            <param name="javascripts">../dhis-web-commons/calendar/calendar.js,../dhis-web-commons/calendar/calendar-lang.js,../dhis-web-commons/calendar/calendar-setup.js,../dhis-web-commons/ouwt/ouwt.js,../dhis-web-commons/util/lists.js,javascript/reportManagement.js,javascript/hashtable.js,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
             <param name="stylesheets">css/StylesForTags.css</param>
             <interceptor-ref name="organisationUnitTreeStack"/>
             

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/benificiaryInfoReportsForm.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/benificiaryInfoReportsForm.vm	2010-12-09 10:23:58 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/benificiaryInfoReportsForm.vm	2010-12-22 07:29:08 +0000
@@ -1,7 +1,7 @@
 
 		<script>
 
-                    var reportModels = new HashTable();
+            var reportModels = new HashTable();
 			var reportFileNames = new HashTable();
 			var reportLevels = new HashTable();
 

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js	2010-09-18 13:07:13 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/datasetLockReport.js	2010-12-22 07:29:08 +0000
@@ -1,10 +1,51 @@
 
+/*
+ *     function getOUDetails(orgUnitIds)
+    {
+         jQuery.postJSON("../dhis-web-commons-ajax-json/getOrganisationUnit.action",{
+          id: orgUnitIds
+         }, function( json ){
+               setFieldValue("your_oranisation_unit_field_id", json.organisationUnit.name );
+         });
+    }
+
+jQuery.extend({
+	postJSON: function( url, data, callback ) {
+		return jQuery.post(url, data, callback, "json");
+	}
+});
+
+ * 
+ */
+
 	
 // function for displaying OrgUnit
+//function getSelectedOrgUnit( orgUnitIds )
+//{
+    //alert( orgUnitIds );
+	//if( orgUnitIds != "" )
+   // {
+	//	var url = "getOrgUnitName.action?selectedOrgUnitId=" + orgUnitIds;
+	//	var request = new Request();
+	//	request.setResponseTypeXML('dataelement');
+	//	request.setCallbackSuccess( responseGetSelectedOrgUnitName );
+	//	request.send(url); 
+		
 function getSelectedOrgUnit( orgUnitIds )
 {
-    if( orgUnitIds != "" )
-    {
+	//alert( orgUnitIds );  
+	jQuery.postJSON("getOrgUnitName.action",{
+    	  //selectedOrgUnitId: orgUnitIds
+    	  id : orgUnitIds[0]
+     }, function( json ){
+           setFieldValue( "ouNameTB",json.organisationUnit.name );
+     });
+}
+
+
+
+/*
+		
 		$.post("getOrgUnitName.action",
 			{
 				selectedOrgUnitId : orgUnitIds
@@ -13,14 +54,17 @@
 			{
 				 responseGetSelectedOrgUnitName(data);
 			},'xml');
+			*/
 			
-	}
-}
+//	}
+//}
 
 function responseGetSelectedOrgUnitName( dataelement )
 {
     var element = dataelement.getElementsByTagName("dataelement");
-    document.reportForm.ouNameTB.value=element[0].getElementsByTagName("OugUnitName")[0].firstChild.nodeValue;
+    var orgUnitname = element[0].getElementsByTagName("OugUnitName")[0].firstChild.nodeValue;
+    //document.reportForm.ouNameTB.value=element[0].getElementsByTagName("OugUnitName")[0].firstChild.nodeValue;
+    document.reportForm.ouNameTB.value = orgUnitname;
 }
 
 

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js	2010-09-17 13:22:39 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/javascript/reportManagement.js	2010-12-22 07:29:08 +0000
@@ -2,6 +2,49 @@
 // Report details form
 // -----------------------------------------------------------------------------
 
+function checkStartDate( dtStr )
+{
+	
+	if( isDate( dtStr ) )
+	{
+		var splitDate = dtStr.split("-");
+		var temDay = splitDate[2];
+		if( parseInt( temDay,10 ) > 1 )
+		{
+			alert("Please select start day of the month");
+			return false;
+		}		
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+function checkEndDate( dtStr )
+{
+	if( isDate( dtStr ) )
+	{
+		var splitDate = dtStr.split("-");
+		var temDay = splitDate[2];
+		if( parseInt( temDay,10 ) < 30 )
+		{
+			alert("Please select end day of the month");
+			return false;
+		}		
+		return true;
+	}
+	else
+	{
+		return false;
+	}
+}
+
+
+
+
+
 function showReportDetails(reportId) {
 	/* var request = new Request();
 	request.setResponseTypeXML('report');
@@ -167,6 +210,75 @@
 	}
 }
 
+
+function getOUDetails(orgUnitIds)
+{
+    /* //var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds;
+	
+    var request = new Request();
+    request.setResponseTypeXML( 'orgunit' );
+    request.setCallbackSuccess( getOUDetailsRecevied );
+    //request.send( url );
+
+    var requestString = "getOrgUnitDetails.action";
+    var params = "orgUnitId=" + orgUnitIds;
+    request.sendAsPost( params );
+    request.send( requestString ); */
+	
+	$.post("getOrgUnitDetails.action",
+			{
+				orgUnitId : orgUnitIds
+			},
+			function (data)
+			{
+				getOUDetailsRecevied(data);
+			},'xml');
+
+    getReports();
+}
+
+function getOUDetailsForOuWiseProgressReport(orgUnitIds)
+{
+    /* //var url = "getOrgUnitDetails.action?orgUnitId=" + orgUnitIds;
+
+    var request = new Request();
+    request.setResponseTypeXML( 'orgunit' );
+    request.setCallbackSuccess( getOUDetailsRecevied );
+    //request.send( url );
+
+    var requestString = "getOrgUnitDetails.action";
+    var params = "orgUnitId=" + orgUnitIds;
+    request.sendAsPost( params );
+    request.send( requestString ); */
+	
+	$.post("getOrgUnitDetails.action",
+		{
+			orgUnitId : orgUnitIds
+		},
+		function (data)
+		{
+			getOUDetailsRecevied(data);
+		},'xml');
+
+}
+
+function getOUDetailsRecevied(xmlObject)
+{
+		
+    var orgUnits = xmlObject.getElementsByTagName("orgunit");
+
+    for ( var i = 0; i < orgUnits.length; i++ )
+    {
+        var id = orgUnits[ i ].getElementsByTagName("id")[0].firstChild.nodeValue;
+        var orgUnitName = orgUnits[ i ].getElementsByTagName("name")[0].firstChild.nodeValue;
+        var level = orgUnits[ i ].getElementsByTagName("level")[0].firstChild.nodeValue;
+		alert( orgUnitName );
+		
+        document.reportForm.ouNameTB.value = orgUnitName;
+        //document.reportForm.ouLevelTB.value = level;
+    }    		
+}
+
 // ----------------------------------------------------------------------
 // Get Periods
 // ----------------------------------------------------------------------
@@ -176,7 +288,8 @@
 	var periodTypeId = periodTypeList.options[periodTypeList.selectedIndex].value;
 	var availablePeriods = document.getElementById('availablePeriods');
 
-	if (periodTypeId != "NA") {
+	if (periodTypeId != "NA") 
+	{
 		/* var url = "getPeriods.action?id=" + periodTypeId;
 
 		var request = new Request();
@@ -193,12 +306,15 @@
 				getPeriodsReceived(data);
 			},'xml');
 			
-	} else {
+	} else 
+	{
+		document.reportForm.generate.disabled=true;
 		clearList(availablePeriods);
 		clearList(reportsList);
 	}
 	var ouId = document.getElementById('ouIDTB').value;
-	var reportType = document.getElementById('reportTypeTB').value;
+	//var reportType = document.getElementById('reportTypeTB').value;
+	 var reportType = document.reportForm.reportTypeNameTB.value;
 
 	getReports(ouId, reportType);
 }
@@ -209,6 +325,11 @@
 	clearList(availablePeriods);
 
 	var periods = xmlObject.getElementsByTagName("period");
+	
+    if( periods.length > 0 )
+    {
+        document.reportForm.generate.disabled=false;
+    }
 
 	for ( var i = 0; i < periods.length; i++) {
 		var id = periods[i].getElementsByTagName("id")[0].firstChild.nodeValue;
@@ -223,25 +344,61 @@
 	}
 }
 
+function getPeriodsForCumulative()
+{
+    //document.reportForm.generate.disabled=false;
+    var periodTypeList = document.getElementById( "periodTypeId" );
+    var periodTypeId = periodTypeList.options[ periodTypeList.selectedIndex ].value;
+    var reportsList = document.getElementById( "reportList" );
+	
+    if ( periodTypeId != "NA" )
+    {
+        var ouId = document.reportForm.ouIDTB.value;
+        var reportTypeName = document.reportForm.reportTypeNameTB.value;
+  
+        getReports(ouId, reportTypeName);
+        document.reportForm.generate.disabled=false;
+    }
+    else
+    {
+    
+        document.reportForm.generate.disabled=true;
+        clearList( reportsList );
+        jQuery("#startDate").val("");
+        jQuery("#endDate").val("");
+        document.reportForm.startDate = "";
+        document.reportForm.endDate = " ";
+    }
+ 
+}
+
+
+
 // ----------------------------------------------------------------------
 // Get Reports
 // ----------------------------------------------------------------------
 
-function getReports(ouId, reportType) {
+//function getReports(ouId, reportType) 
+function getReports(orgUnitIds, reportTypeName) 
+{
+	//alert("inside function getReports");
 	var periodTypeList = document.getElementById('periodTypeId');
 	var periodType = periodTypeList.options[periodTypeList.selectedIndex].value;
 	// var autogenvalue = document.getElementById( 'autogen' ).value;
-
-	if (periodType != "NA" && ouId != null && ouId != "") {
+	
+	//alert( periodType + "," + orgUnitIds + "," + reportTypeName );
+	
+	if ( periodType != "NA" && orgUnitIds != null && reportTypeName != "" ) 
+	{
 		
-		/* var url = "getReports.action?periodType=" + periodType + "&ouId="
-				+ ouId + "&reportType=" + reportType;
+		var url = "getReports.action?periodType=" + periodType + "&ouId=" + orgUnitIds + "&reportType=" + reportTypeName;
 
 		var request = new Request();
 		request.setResponseTypeXML('report');
 		request.setCallbackSuccess(getReportsReceived);
-		request.send(url); */
+		request.send(url); 
 		
+		/*
 		$.post("getReports.action",
 			{
 				periodType : periodType,
@@ -252,6 +409,7 @@
 			{
 				getReportsReceived(data);
 			},'xml');
+			*/
 	}
 }
 

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm	2010-12-03 13:29:28 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm	2010-12-22 07:29:08 +0000
@@ -12,7 +12,7 @@
     <li>Report Analysis</li>
     <ul>
         <li><a href = "upwardReportAnalyser.action">GOI Reports</a></li>
-        <li><a href = "edReportForm.action">ED Report</a></li>
+      <!--  <li><a href = "edReportForm.action">ED Report</a></li> -->
         <li><a href = "routineReportAnalyser.action">Routine Reports</a></li>
         <li><a href = "feedbackReportAnalyser.action">Feedback Reports</a></li>
         <li><a href = "aggregationReportAnalyser.action">Aggregation Reports</a></li>

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForDataSetLockReports.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForDataSetLockReports.vm	2010-09-09 12:12:20 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForDataSetLockReports.vm	2010-12-22 07:29:08 +0000
@@ -11,8 +11,8 @@
         <a href="index.action">
           <img src="images/goback.png" width="36" height="30" alt="$i18n.getString( "go_back" )"></a>
 </div>
-#parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
-
+##parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
+#parse( "/dhis-web-commons/ouwt/orgunittreesearch.vm" )
 <!-- The script that registeres selctions in the orgunit tree -->
 <script type="text/javascript">
 	function orgUnitHasBeenSelected( orgUnitIds )
@@ -22,6 +22,7 @@
 		//reportListFileName = document.reportForm.reportListFileNameTB.value;
 		
 		// call orgUnit selection function
+		//alert( orgUnitIds );
 		getSelectedOrgUnit( orgUnitIds );
 
 		/*if(orgUnitIds != null && orgUnitIds != "" )

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForRoutineReport.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForRoutineReport.vm	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForRoutineReport.vm	2010-12-22 07:29:08 +0000
@@ -11,7 +11,8 @@
         <a href="index.action">
           <img src="images/goback.png" width="36" height="30" alt="$i18n.getString( "go_back" )"></a>
 </div>
-#parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
+##parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
+#parse( "/dhis-web-commons/ouwt/orgunittreesearch.vm" ) 
 
 <!-- The script that registeres selctions in the orgunit tree -->
 <script type="text/javascript">
@@ -24,6 +25,7 @@
 
 	if(orgUnitIds != null && orgUnitIds != "" )
 	{
+		//alert(  reportTypeName + "," +  orgUnitIds );
 		getReports(orgUnitIds, reportTypeName)		
 	}
 }

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ougUnitName.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ougUnitName.vm	2010-07-19 08:20:14 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ougUnitName.vm	2010-12-22 07:29:08 +0000
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dataelements>
-  <dataelement>
-	 <OugUnitName>$organisationUnit.getName()</OugUnitName> 
-  </dataelement>	
-</dataelements>
\ No newline at end of file
+
+{ "organisationUnit":
+    {
+   "id": $!{organisationUnit.id},
+   "name": "$!encoder.jsonEncode( ${organisationUnit.name} )"
+    }
+}