← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2458: CleaningCode: OrgunitwiseProgressReports; Added Priveleges to all reports

 

------------------------------------------------------------
revno: 2458
committer: Bharath <chbharathk@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-12-31 12:46:18 +0530
message:
  CleaningCode: OrgunitwiseProgressReports; Added Priveleges to all reports
modified:
  local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportAnalyserFormAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportFormAction.java
  local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportResultAction.java
  local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml
  local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties
  local/in/dhis-web-reports-national/src/main/resources/struts.xml
  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/menuWithTreeForOuWiseProgress.vm
  local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ouWiseProgressReportFront.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-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java'
--- local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2010-12-29 16:17:28 +0000
+++ local/in/dhis-in-services/dhis-in-service-reports/src/main/java/org/hisp/dhis/reports/DefaultReportService.java	2010-12-31 07:16:18 +0000
@@ -591,7 +591,7 @@
                 {
                     Double aggregatedValue = aggregationService.getAggregatedDataValue( dataElement, optionCombo,
                         startDate, endDate, organisationUnit );
-                    System.out.println( dataElement.getId() + " : " + optionCombo.getId() + " : " + startDate + " : " + endDate + " : " + organisationUnit + " : " + aggregatedValue);
+                    //System.out.println( dataElement.getId() + " : " + optionCombo.getId() + " : " + startDate + " : " + endDate + " : " + organisationUnit + " : " + aggregatedValue);
                     if ( aggregatedValue == null )
                     {
                         replaceString = NULL_REPLACEMENT;

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportAnalyserFormAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportAnalyserFormAction.java	2010-08-30 07:07:13 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportAnalyserFormAction.java	2010-12-31 07:16:18 +0000
@@ -20,7 +20,6 @@
 public class GenerateMetaDataReportAnalyserFormAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -52,8 +51,6 @@
 
     private String raFolderName;
 
-    int count;
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -67,8 +64,6 @@
 
         reportNames = new ArrayList<String>();
 
-        count = 0;
-
         getSelectedReportList( "metaDataReportsList.xml" );
 
         return SUCCESS;
@@ -89,15 +84,12 @@
         }
         catch ( NullPointerException npe )
         {
-            // do nothing, but we might be using this somewhere without
-            // USER_HOME set, which will throw a NPE
+            System.out.println("DHIS2_HOME is not set.");
         }
 
         String reportId = "";
         String reportName = "";
 
-        // int count = 0;
-
         try
         {
             DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
@@ -121,7 +113,6 @@
 
                 reportIds.add( reportId );
                 reportNames.add( reportName );
-
             }// end of for loop with s var
         }// try block end
         catch ( SAXParseException err )
@@ -138,9 +129,6 @@
         {
             t.printStackTrace();
         }
-
     }// getReportList end
 
 }
-
-

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java	2010-12-29 10:06:33 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/meta/action/GenerateMetaDataReportResultAction.java	2010-12-31 07:16:18 +0000
@@ -53,10 +53,6 @@
 
 import com.opensymphony.xwork2.Action;
 
-// -------------------------------------------------------------------------
-
-// -------------------------------------------------------------------------
-
 public class GenerateMetaDataReportResultAction
     implements Action
 {
@@ -211,76 +207,55 @@
 
         raFolderName = reportService.getRAFolderName();
 
+        System.out.println( "Report Generation Start Time is : \t" + new Date() );
+        
         if ( metaDataId.equalsIgnoreCase( ORGUNIT ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateOrgUnitList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( ORGUNITGRP ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateOrgUnitGroupList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( DATAELEMENT ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateDataElementList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( DATAELEMENTGRP ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateDataElementGroupList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( INDIACTOR ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateIndicatorList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( INDICATORGRP ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateIndicatorGroupList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( DATASET ) )
         {
             generateDataSetList();
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
         }
         else if ( metaDataId.equalsIgnoreCase( VALIDATIONRULE ) )
         {
             generateValidationRuleList();
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
         }
         else if ( metaDataId.equalsIgnoreCase( VALIDATIONRULEGRP ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateValidationGroupList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( USER ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateUserList();
-
         }
         else if ( metaDataId.equalsIgnoreCase( ORGUNIT_USER ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateOrgUnitTreeAlongWithUsers();
-
         }
-
         else if ( metaDataId.equalsIgnoreCase( SUMMARY ) )
         {
-            System.out.println( "Report Generation Start Time is : \t" + new Date() );
             generateSummaryReport();
-
         }
 
         statementManager.destroy();
@@ -339,7 +314,6 @@
         // ----------------------------------------------------------------------
         // Coding For Printing MetaData
         // ----------------------------------------------------------------------
-        // -
 
         String outputReportPath = System.getenv( "DHIS2_HOME" ) + File.separator + raFolderName + File.separator
             + "output" + File.separator + UUID.randomUUID().toString() + ".xls";

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportFormAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportFormAction.java	2010-11-15 18:05:51 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportFormAction.java	2010-12-31 07:16:18 +0000
@@ -8,18 +8,6 @@
 public class GenerateOuWiseProgressReportFormAction
     implements Action
 {
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-/*
-    private ReportService reportService;
-
-    public void setReportService( ReportService reportService )
-    {
-        this.reportService = reportService;
-    }
-*/
     // -------------------------------------------------------------------------
     // Getter & Setter
     // -------------------------------------------------------------------------
@@ -37,15 +25,6 @@
     {
         return reportTypeName;
     }  
- /*   
-    private List<Report_in> reportList;
-
-    public List<Report_in> getReportList()
-    {
-        return reportList;
-    }
-*/
- //   private String raFolderName;
 
     // -------------------------------------------------------------------------
     // Action implementation
@@ -54,93 +33,10 @@
     public String execute()
         throws Exception
     {
-       
-        
-        
-        // raFolderName = reportService.getRAFolderName();
-       // System.out.println( "raFolderName = " + raFolderName );
-       // reportList = new ArrayList<Report>();
-        
-//      reportList = new ArrayList<Report_in>( reportService.getReportsByReportType( ReportType.RT_ORGUNITWISEPROGRESS ) );
         reportTypeName = ReportType.RT_ORGUNITWISEPROGRESS;
         
         periodTypeName = MonthlyPeriodType.NAME;
         
-//        System.out.println( "PeriodTypeName: "+ periodTypeName);
-        
-//        reportList = new ArrayList<Report_in>();
-
-        // getSelectedReportList();
-
         return SUCCESS;
     }
-    /*
-     * public void getSelectedReportList() { String fileName =
-     * "ouWiseProgressReportsList.xml";
-     * System.out.println("fileName = "+fileName); String path =
-     * System.getProperty( "user.home" ) + File.separator + "dhis" +
-     * File.separator + raFolderName + File.separator + fileName;
-     * System.out.println("path = "+path); try { String newpath = System.getenv(
-     * "DHIS2_HOME" ); if ( newpath != null ) { path = newpath + File.separator
-     * + raFolderName + File.separator + fileName;
-     * System.out.println("path = "+path); } } catch ( NullPointerException npe
-     * ) { // do nothing, but we might be using this somewhere without //
-     * DHIS2_HOME set, which will throw a NPE }
-     * 
-     * String reportId = ""; String reportName = ""; String reportType = "";
-     * String reportLevel = ""; String reportModel = ""; String reportFileName =
-     * "";
-     * 
-     * try { DocumentBuilderFactory docBuilderFactory =
-     * DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder =
-     * docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(
-     * new File( path ) ); if ( doc == null ) { System.out.println(
-     * "XML File Not Found at user home" ); return; }
-     * 
-     * NodeList listOfReports = doc.getElementsByTagName( "report" ); int
-     * totalReports = listOfReports.getLength(); for ( int s = 0; s <
-     * totalReports; s++ ) { Node reportNode = listOfReports.item( s ); if (
-     * reportNode.getNodeType() == Node.ELEMENT_NODE ) { Element reportElement =
-     * (Element) reportNode; reportId = reportElement.getAttribute( "id" );
-     * 
-     * NodeList reportNameList = reportElement.getElementsByTagName( "name" );
-     * Element reportNameElement = (Element) reportNameList.item( 0 ); NodeList
-     * textreportNameList = reportNameElement.getChildNodes(); reportName =
-     * ((Node) textreportNameList.item( 0 )).getNodeValue().trim();
-     * 
-     * NodeList reportTypeList = reportElement.getElementsByTagName( "type" );
-     * Element reportTypeElement = (Element) reportTypeList.item( 0 ); NodeList
-     * textreportTypeList = reportTypeElement.getChildNodes(); reportType =
-     * ((Node) textreportTypeList.item( 0 )).getNodeValue().trim();
-     * 
-     * NodeList reportModelList = reportElement.getElementsByTagName( "model" );
-     * Element reportModelElement = (Element) reportModelList.item( 0 );
-     * NodeList textreportModelList = reportModelElement.getChildNodes();
-     * reportModel = ((Node) textreportModelList.item( 0
-     * )).getNodeValue().trim();
-     * 
-     * NodeList reportFileNameList = reportElement.getElementsByTagName(
-     * "filename" ); Element reportFileNameElement = (Element)
-     * reportFileNameList.item( 0 ); NodeList textreportFileNameList =
-     * reportFileNameElement.getChildNodes(); reportFileName = ((Node)
-     * textreportFileNameList.item( 0 )).getNodeValue().trim();
-     * 
-     * NodeList reportLevelList = reportElement.getElementsByTagName( "level" );
-     * Element reportLevelElement = (Element) reportLevelList.item( 0 );
-     * NodeList textreportLevelList = reportLevelElement.getChildNodes();
-     * reportLevel = ((Node) textreportLevelList.item( 0
-     * )).getNodeValue().trim();
-     * 
-     * Report reportObj = new Report(reportId, reportName, reportType,
-     * reportModel, reportFileName, reportLevel); reportList.add( reportObj ); }
-     * }// end of for loop with s var }// try block end catch (
-     * SAXParseException err ) { System.out.println( "** Parsing error" +
-     * ", line " + err.getLineNumber() + ", uri " + err.getSystemId() );
-     * System.out.println( " " + err.getMessage() ); } catch ( SAXException e )
-     * { Exception x = e.getException(); ((x == null) ? e :
-     * x).printStackTrace(); } catch ( Throwable t ) { t.printStackTrace(); }
-     * System.out.println(reportList.size());
-     * 
-     * }// getReportList end
-     */
 }

=== modified file 'local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportResultAction.java'
--- local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportResultAction.java	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/java/org/hisp/dhis/reports/ouwiseprogress/action/GenerateOuWiseProgressReportResultAction.java	2010-12-31 07:16:18 +0000
@@ -11,13 +11,7 @@
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 
 import jxl.Workbook;
 import jxl.format.Alignment;
@@ -32,42 +26,19 @@
 import jxl.write.WritableWorkbook;
 
 import org.amplecode.quick.StatementManager;
-import org.apache.velocity.tools.generic.MathTool;
-import org.hisp.dhis.aggregation.AggregationService;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataset.DataSet;
-import org.hisp.dhis.dataset.DataSetService;
-import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueService;
 import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.organisationunit.comparator.OrganisationUnitShortNameComparator;
-import org.hisp.dhis.period.Period;
-import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.reports.ReportService;
 import org.hisp.dhis.reports.Report_in;
-import org.hisp.dhis.system.util.MathUtils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
+import org.hisp.dhis.reports.Report_inDesign;
 
 import com.opensymphony.xwork2.Action;
 
-
 public class GenerateOuWiseProgressReportResultAction
     implements Action
 {
-
-    private static final String NULL_REPLACEMENT = "0";
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -78,13 +49,6 @@
         this.statementManager = statementManager;
     }
 
-    private DataSetService dataSetService;
-
-    public void setDataSetService( DataSetService dataSetService )
-    {
-        this.dataSetService = dataSetService;
-    }
-
     private ReportService reportService;
 
     public void setReportService( ReportService reportService )
@@ -92,20 +56,6 @@
         this.reportService = reportService;
     }
 
-    private PeriodService periodService;
-
-    public void setPeriodService( PeriodService periodService )
-    {
-        this.periodService = periodService;
-    }
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
     private OrganisationUnitService organisationUnitService;
 
     public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
@@ -113,39 +63,6 @@
         this.organisationUnitService = organisationUnitService;
     }
 
-    public OrganisationUnitService getOrganisationUnitService()
-    {
-        return organisationUnitService;
-    }
-
-    private AggregationService aggregationService;
-
-    public void setAggregationService( AggregationService aggregationService )
-    {
-        this.aggregationService = aggregationService;
-    }
-
-    private DataValueService dataValueService;
-
-    public void setDataValueService( DataValueService dataValueService )
-    {
-        this.dataValueService = dataValueService;
-    }
-
-    private DataElementCategoryService dataElementCategoryOptionComboService;
-    
-    public void setDataElementCategoryOptionComboService( DataElementCategoryService dataElementCategoryOptionComboService )
-    {
-        this.dataElementCategoryOptionComboService = dataElementCategoryOptionComboService;
-    }
-/*
-    private DataElementCategoryService dataElementCategoryService;
-
-    public void setDataElementCategoryService( DataElementCategoryService dataElementCategoryService )
-    {
-        this.dataElementCategoryService = dataElementCategoryService;
-    }
-*/
     private I18nFormat format;
 
     public void setFormat( I18nFormat format )
@@ -156,14 +73,7 @@
     // -------------------------------------------------------------------------
     // Properties
     // -------------------------------------------------------------------------
-/*    
-    private PeriodStore periodStore;
 
-    public void setPeriodStore( PeriodStore periodStore )
-    {
-        this.periodStore = periodStore;
-    }
-*/
     private InputStream inputStream;
 
     public InputStream getInputStream()
@@ -171,12 +81,6 @@
         return inputStream;
     }
 
-    /*
-     * private String contentType;
-     * 
-     * public String getContentType() { return contentType; }
-     */
-
     private String fileName;
 
     public String getFileName()
@@ -184,114 +88,6 @@
         return fileName;
     }
 
-    /*
-     * private int bufferSize;
-     * 
-     * public int getBufferSize() { return bufferSize; }
-     */
-
-    private MathTool mathTool;
-
-    public MathTool getMathTool()
-    {
-        return mathTool;
-    }
-
-    private OrganisationUnit selectedOrgUnit;
-
-    public OrganisationUnit getSelectedOrgUnit()
-    {
-        return selectedOrgUnit;
-    }
-
-    private List<OrganisationUnit> orgUnitList;
-
-    public List<OrganisationUnit> getOrgUnitList()
-    {
-        return orgUnitList;
-    }
-
-    private Period selectedPeriod;
-
-    public Period getSelectedPeriod()
-    {
-        return selectedPeriod;
-    }
-
-    private List<String> dataValueList;
-
-    public List<String> getDataValueList()
-    {
-        return dataValueList;
-    }
-
-    private List<String> services;
-
-    public List<String> getServices()
-    {
-        return services;
-    }
-
-    private List<String> slNos;
-
-    public List<String> getSlNos()
-    {
-        return slNos;
-    }
-
-    private SimpleDateFormat simpleDateFormat;
-
-    public SimpleDateFormat getSimpleDateFormat()
-    {
-        return simpleDateFormat;
-    }
-
-    private SimpleDateFormat monthFormat;
-
-    public SimpleDateFormat getMonthFormat()
-    {
-        return monthFormat;
-    }
-
-    private SimpleDateFormat simpleMonthFormat;
-
-    public SimpleDateFormat getSimpleMonthFormat()
-    {
-        return simpleMonthFormat;
-    }
-
-    private SimpleDateFormat yearFormat;
-
-    public SimpleDateFormat getYearFormat()
-    {
-        return yearFormat;
-    }
-
-    private SimpleDateFormat simpleYearFormat;
-
-    public SimpleDateFormat getSimpleYearFormat()
-    {
-        return simpleYearFormat;
-    }
-
-    private List<String> deCodeType;
-
-    private List<String> serviceType;
-
-    private String reportFileNameTB;
-/*
-    public void setReportFileNameTB( String reportFileNameTB )
-    {
-        this.reportFileNameTB = reportFileNameTB;
-    }
-*/
-    private String reportModelTB;
-/*
-    public void setReportModelTB( String reportModelTB )
-    {
-        this.reportModelTB = reportModelTB;
-    }
-*/
     private String reportList;
 
     public void setReportList( String reportList )
@@ -312,123 +108,43 @@
     {
         this.endDate = endDate;
     }
-/*
-    private List<String> orgUnitListCB;
 
-    public void setOrgUnitListCB( List<String> orgUnitListCB )
-    {
-        this.orgUnitListCB = orgUnitListCB;
-    }
-*/
     private int ouIDTB;
 
     public void setOuIDTB( int ouIDTB )
     {
         this.ouIDTB = ouIDTB;
     }
-/*
-    private int availablePeriods;
-
-    public void setAvailablePeriods( int availablePeriods )
-    {
-        this.availablePeriods = availablePeriods;
-    }
-
-    private String aggCB;
-
-    public void setAggCB( String aggCB )
-    {
-        this.aggCB = aggCB;
-    }
-*/
-    private List<Integer> sheetList;
-
-    private List<Integer> rowList;
-
-    private List<Integer> colList;
+
+    private OrganisationUnit selectedOrgUnit;
+
+    private List<OrganisationUnit> orgUnitList;
+
+    private SimpleDateFormat simpleDateFormat;
+
+    private String reportFileNameTB;
+
+    private String reportModelTB;
 
     private Date sDate;
 
     private Date eDate;
 
-    private PeriodType periodType;
-
-    public PeriodType getPeriodType()
-    {
-        return periodType;
-    }
-
-    private List<Period> periods;
-
-    public List<Period> getPeriods()
-    {
-        return periods;
-    }
-
     private String raFolderName;
 
-    private List<OrganisationUnit> childOrgUnits;
-
-    public List<OrganisationUnit> getChildOrgUnits()
-    {
-        return childOrgUnits;
-    }
-
-    Integer startMonth;
-
-    Integer endMonth;
-
-    private Map<String, String> months;
-
-    public Map<String, String> getMonths()
-    {
-        return months;
-    }
-
-    private Map<String, Integer> monthOrder;
-
-    public Map<String, Integer> getMonthOrder()
-    {
-        return monthOrder;
-    }
-
-    int deFlag1;
-
-    int deFlag2;
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
-
     @Override
     public String execute()
         throws Exception
     {
-
         statementManager.initialise();
-        deFlag2 = 0;
-        deFlag1 = 0;
+
         // Initialization
         raFolderName = reportService.getRAFolderName();
-
-        mathTool = new MathTool();
-        services = new ArrayList<String>();
-        slNos = new ArrayList<String>();
-        deCodeType = new ArrayList<String>();
-        serviceType = new ArrayList<String>();
-        //String deCodesXMLFileName = "";
-        simpleDateFormat = new SimpleDateFormat( "MMM-yyyy" );
-        monthFormat = new SimpleDateFormat( "MMMM" );
-        simpleMonthFormat = new SimpleDateFormat( "MMM" );
-        yearFormat = new SimpleDateFormat( "yyyy" );
-        simpleYearFormat = new SimpleDateFormat( "yy" );
-        //deCodesXMLFileName = reportList + "DECodes.xml";
-        int tempNum = 0;
-
-        startMonth = 0;
-
-        endMonth = 0;
-        
+        simpleDateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
+
         // Getting Report Details       
         String deCodesXMLFileName = "";
 
@@ -437,24 +153,7 @@
         deCodesXMLFileName = selReportObj.getXmlTemplateName();
         reportModelTB = selReportObj.getModel();
         reportFileNameTB = selReportObj.getExcelTemplateName();
-        System.out.println( "Report Generation Start Time is : \t" + new Date() );
-        System.out.println( reportModelTB + " : " + reportFileNameTB + " : " + deCodesXMLFileName + " : " + ouIDTB );
-
-      //  String parentUnit = "";
-
-        sheetList = new ArrayList<Integer>();
-        rowList = new ArrayList<Integer>();
-        colList = new ArrayList<Integer>();
-
-        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
-            + "output" + File.separator + UUID.randomUUID().toString() + ".xls";
-        Workbook templateWorkbook = Workbook.getWorkbook( new File( inputTemplatePath ) );
-
-        WritableWorkbook outputReportWorkbook = Workbook
-            .createWorkbook( new File( outputReportPath ), templateWorkbook );
-
+        
         // OrgUnit Related Info
         selectedOrgUnit = new OrganisationUnit();
         selectedOrgUnit = organisationUnitService.getOrganisationUnit( ouIDTB );
@@ -464,148 +163,98 @@
             orgUnitList = new ArrayList<OrganisationUnit>( selectedOrgUnit.getChildren() );
             Collections.sort( orgUnitList, new OrganisationUnitShortNameComparator() );
             orgUnitList.add( selectedOrgUnit );
-
         }
-        // System.out.println(orgUnitList.size());
+
+        System.out.println( selectedOrgUnit.getName()+ " : " + selReportObj.getName()+" : Report Generation Start Time is : " + new Date() );
+
+        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 + "output" + File.separator + UUID.randomUUID().toString() + ".xls";
+        Workbook templateWorkbook = Workbook.getWorkbook( new File( inputTemplatePath ) );
+
+        WritableWorkbook outputReportWorkbook = Workbook.createWorkbook( new File( outputReportPath ), templateWorkbook );
+        WritableFont arialBold = new WritableFont( WritableFont.ARIAL, 10, WritableFont.BOLD );
 
         // Period Info
         sDate = format.parseDate( startDate );
         eDate = format.parseDate( endDate );
 
-        // System.out.println(sDate.getTime() + " "+ eDate.getTime());
-        List<String> deCodesList = getDECodes( deCodesXMLFileName );
+        // Getting DataValues
+        List<Report_inDesign> reportDesignList = reportService.getReportDesign( deCodesXMLFileName );
+        int orgUnitCount = 0;
 
         Iterator<OrganisationUnit> it = orgUnitList.iterator();
-
-        int rowCounter = 0;
-        int orgUnitCount = 0;
-        // System.out.println("deCodesList size = " + deCodesList.size());
-
-        OrganisationUnit currentOrgUnit = new OrganisationUnit();
-
         while ( it.hasNext() )
-
         {
-            currentOrgUnit = (OrganisationUnit) it.next();
-            // System.out.println(orgUnitCount);
-            Iterator<String> it1 = deCodesList.iterator();
+            OrganisationUnit currentOrgUnit = (OrganisationUnit) it.next();
+
             int count1 = 0;
-            while ( it1.hasNext() )
+            Iterator<Report_inDesign> reportDesignIterator = reportDesignList.iterator();
+            while ( reportDesignIterator.hasNext() )
             {
+                Report_inDesign report_inDesign = (Report_inDesign) reportDesignIterator.next();
 
-                String deCodeString = (String) it1.next();
-                // System.out.println(deCodeString);
-                // System.out.println(deCodeType.size());
-               // String deType = (String) deCodeType.get( count1 );
-                String sType = (String) serviceType.get( count1 );
-                // System.out.println(deType + " " + sType);
-               // int count = 0;
-               // double sum = 0.0;
-                //int flag1 = 0;
+                String sType = report_inDesign.getStype();
+                String deCodeString = report_inDesign.getExpression();
                 String tempStr = "";
-                int tempColNo = 0;
-                int tempRowNo = rowList.get( count1 );
-                if ( tempRowNo > 6 )
-                {
-                    tempColNo = colList.get( count1 ) + orgUnitCount;
-                }
-                else
-                {
-                    tempColNo = colList.get( count1 );
-                }
-                int sheetNo = sheetList.get( count1 );
-
-                // System.out.println("tempRowNo = " + tempRowNo +
-                // " tempColNo = " + tempColNo);
-
-                if ( deCodeString.equalsIgnoreCase( "FACILITY" ) )
+
+                if ( deCodeString.equalsIgnoreCase( "FACILITY" ) || deCodeString.equalsIgnoreCase( "PROGRESSIVE-ORGUNIT" ) )
                 {
                     tempStr = currentOrgUnit.getName();
-                    deFlag2 = 0;
                 }
                 else if ( deCodeString.equalsIgnoreCase( "MONTH-FROM" ) )
                 {
                     tempStr = simpleDateFormat.format( sDate );
-                    deFlag2 = 0;
                 }
-
                 else if ( deCodeString.equalsIgnoreCase( "MONTH-TO" ) )
                 {
                     tempStr = simpleDateFormat.format( eDate );
-                    deFlag2 = 0;
                 }
                 else if ( deCodeString.equalsIgnoreCase( "NA" ) )
                 {
                     tempStr = " ";
-                    deFlag2 = 0;
-                }
-                else if ( tempRowNo == 7 && tempColNo > 3 )
-                {
-                    tempStr = currentOrgUnit.getName();
-                    deFlag2 = 0;
                 }
                 else
                 {
-                    rowCounter += 1;
-
                     if ( sType.equalsIgnoreCase( "dataelement" ) )
                     {
-                        tempStr = getResultDataValue( deCodeString, sDate, eDate, currentOrgUnit );
-                        if ( deFlag2 == 1 )
-                        {
-                            try
-                            {
-                                tempNum = Integer.parseInt( tempStr );
-                            }
-                            catch ( Exception ex )
-                            {
-                                tempNum = 0;
-                            }
-
-                        }
+                        tempStr = reportService.getResultDataValue( deCodeString, sDate, eDate, currentOrgUnit, reportModelTB );
                     }
+                }
 
-                }
+                int tempColNo = 0;
+                int tempRowNo = report_inDesign.getRowno();
+                if ( tempRowNo > 6 )
+                {
+                    tempColNo = report_inDesign.getColno() + orgUnitCount;
+                }
+                else
+                {
+                    tempColNo = report_inDesign.getColno();
+                }
+                int sheetNo = report_inDesign.getSheetno();
+                WritableSheet sheet0 = outputReportWorkbook.getSheet( sheetNo );
 
                 if ( tempStr == null || tempStr.equals( " " ) )
                 {
-
-                    WritableSheet sheet0 = outputReportWorkbook.getSheet( sheetNo );
                     WritableCellFormat wCellformat = new WritableCellFormat();
 
                     wCellformat.setBorder( Border.ALL, BorderLineStyle.THIN );
-                    wCellformat.setBorder( Border.ALL, BorderLineStyle.THIN );
                     wCellformat.setWrap( true );
                     wCellformat.setAlignment( Alignment.CENTRE );
 
                     sheet0.addCell( new Blank( tempColNo, tempRowNo, wCellformat ) );
-
                 }
                 else
                 {
-
                     if ( reportModelTB.equalsIgnoreCase( "PROGRESSIVE-ORGUNIT" ) )
                     {
-                        if ( deCodeString.equalsIgnoreCase( "FACILITY" ) )
-                        {
-
-                        }
-
-                        else if ( deCodeString.equalsIgnoreCase( "MONTH-FROM" )
-                            || deCodeString.equalsIgnoreCase( "MONTH-TO" ) )
-                        {
-
-                        }
-
-                        WritableSheet sheet0 = outputReportWorkbook.getSheet( sheetNo );
+                        if( deCodeString.equalsIgnoreCase( "FACILITY" ) || deCodeString.equalsIgnoreCase( "MONTH-FROM" ) || deCodeString.equalsIgnoreCase( "MONTH-TO" ) )
+                        {
+                        }
+
                         WritableCellFormat wCellformat;
 
-                       // WritableCell cell = sheet0.getWritableCell( tempColNo, tempRowNo );
-                        WritableFont arialBold = new WritableFont( WritableFont.ARIAL, 10, WritableFont.BOLD );
-
-                        int lastCol = 3 + (orgUnitList.size());
-                        // System.out.println(lastCol);
-                        if ( tempColNo == lastCol )
+                        if( orgUnitCount == orgUnitList.size()-1 )
                         {
                             wCellformat = new WritableCellFormat( arialBold );
                         }
@@ -613,35 +262,24 @@
                         {
                             wCellformat = new WritableCellFormat();
                         }
+                        
                         wCellformat.setBorder( Border.ALL, BorderLineStyle.THIN );
                         wCellformat.setAlignment( Alignment.CENTRE );
                         wCellformat.setWrap( true );
 
                         try
                         {
-                            if ( deFlag2 == 1 )
-                            {
-                                sheet0.addCell( new Number( tempColNo, tempRowNo, tempNum, wCellformat ) );
-                            }
-                            else
-                            {
-                                sheet0.addCell( new Label( tempColNo, tempRowNo, tempStr, wCellformat ) );
-                            }
+                            sheet0.addCell( new Number( tempColNo, tempRowNo, Double.parseDouble( tempStr ), wCellformat ) );
                         }
-
-                        catch ( Exception e )
+                        catch( Exception e )
                         {
-                            System.out.println( "Cannot write to Excel" );
+                            sheet0.addCell( new Label( tempColNo, tempRowNo, tempStr, wCellformat ) );
                         }
                     }
                 }
-
                 count1++;
-
             }// inner while loop end
-
             orgUnitCount++;
-
         }// outer while loop end
 
         outputReportWorkbook.write();
@@ -653,7 +291,7 @@
         File outputReportFile = new File( outputReportPath );
         inputStream = new BufferedInputStream( new FileInputStream( outputReportFile ) );
 
-        System.out.println( "Report Generation End Time is : \t" + new Date() );
+        System.out.println( selectedOrgUnit.getName()+ " : " + selReportObj.getName()+" Report Generation End Time is : " + new Date() );
 
         outputReportFile.deleteOnExit();
 
@@ -661,266 +299,4 @@
 
         return SUCCESS;
     }
-
-    public List<String> getDECodes( String fileName )
-    {
-        List<String> deCodes = new ArrayList<String>();
-        String path = System.getProperty( "user.home" ) + File.separator + "dhis" + File.separator + raFolderName
-            + File.separator + fileName;
-        try
-        {
-            String newpath = System.getenv( "DHIS2_HOME" );
-            if ( newpath != null )
-            {
-                path = newpath + File.separator + raFolderName + File.separator + fileName;
-            }
-        }
-        catch ( NullPointerException npe )
-        {
-            // do nothing, but we might be using this somewhere without
-            // USER_HOME set, which will throw a NPE
-        }
-        // System.out.println("path = "+path);
-
-        try
-        {
-            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
-            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
-            Document doc = docBuilder.parse( new File( path ) );
-            if ( doc == null )
-            {
-                // System.out.println( "There is no DECodes related XML file in
-                // the user home" );
-                return null;
-            }
-
-            NodeList listOfDECodes = doc.getElementsByTagName( "de-code" );
-            int totalDEcodes = listOfDECodes.getLength();
-
-            for ( int s = 0; s < totalDEcodes; s++ )
-            {
-                Element deCodeElement = (Element) listOfDECodes.item( s );
-                NodeList textDECodeList = deCodeElement.getChildNodes();
-                deCodes.add( ((Node) textDECodeList.item( 0 )).getNodeValue().trim() );
-                serviceType.add( deCodeElement.getAttribute( "stype" ) );
-                deCodeType.add( deCodeElement.getAttribute( "type" ) );
-                sheetList.add( new Integer( deCodeElement.getAttribute( "sheetno" ) ) );
-                rowList.add( new Integer( deCodeElement.getAttribute( "rowno" ) ) );
-                colList.add( new Integer( deCodeElement.getAttribute( "colno" ) ) );
-
-            }// end of for loop with s var
-        }// try block end
-        catch ( SAXParseException err )
-        {
-            System.out.println( "** Parsing error" + ", line " + err.getLineNumber() + ", uri " + err.getSystemId() );
-            System.out.println( " " + err.getMessage() );
-        }
-        catch ( SAXException e )
-        {
-            Exception x = e.getException();
-            ((x == null) ? e : x).printStackTrace();
-        }
-        catch ( Throwable t )
-        {
-            t.printStackTrace();
-        }
-        // System.out.println("serviceType "+serviceType.size() + " deCodeType "
-        // +deCodeType.size() +" sheetList "+sheetList.size() +
-        // " rowList "+rowList.size() + " colList " + colList.size());
-        return deCodes;
-    }// getDECodes end
-
-    /*
-     * Returns the PeriodType Object for selected DataElement, If no PeriodType
-     * is found then by default returns Monthly Period type
-     */
-    public PeriodType getDataElementPeriodType( DataElement de )
-    {
-        List<DataSet> dataSetList = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
-        Iterator<DataSet> it = dataSetList.iterator();
-        while ( it.hasNext() )
-        {
-            DataSet ds = (DataSet) it.next();
-            List<DataElement> dataElementList = new ArrayList<DataElement>( ds.getDataElements() );
-            if ( dataElementList.contains( de ) )
-            {
-                return ds.getPeriodType();
-            }
-        }
-
-        return null;
-
-    } // getDataElementPeriodType end
-
-    /**
-     * Converts an expression on the form<br>
-     * [34] + [23], where the numbers are IDs of DataElements, to the form<br>
-     * 200 + 450, where the numbers are the values of the DataValues registered
-     * for the Period and source.
-     * 
-     * @return The generated expression
-     */
-    private String getResultDataValue( String formula, Date startDate, Date endDate, OrganisationUnit organisationUnit )
-    {
-        try
-        {
-
-            // System.out.println( "expression : " + formula + " ***** " +
-            // String.valueOf( startDate ) + " **** "
-            // + String.valueOf( endDate ) );
-
-            Pattern pattern = Pattern.compile( "(\\[\\d+\\.\\d+\\])" );
-
-            Matcher matcher = pattern.matcher( formula );
-            StringBuffer buffer = new StringBuffer();
-
-            String resultValue = "";
-
-            while ( matcher.find() )
-            {
-                String replaceString = matcher.group();
-
-                replaceString = replaceString.replaceAll( "[\\[\\]]", "" );
-                String optionComboIdStr = replaceString.substring( replaceString.indexOf( '.' ) + 1, replaceString
-                    .length() );
-
-                replaceString = replaceString.substring( 0, replaceString.indexOf( '.' ) );
-
-                int dataElementId = Integer.parseInt( replaceString );
-                int optionComboId = Integer.parseInt( optionComboIdStr );
-
-                DataElement dataElement = dataElementService.getDataElement( dataElementId );
-                DataElementCategoryOptionCombo optionCombo = dataElementCategoryOptionComboService.getDataElementCategoryOptionCombo( optionComboId );
-
-                if ( dataElement == null || optionCombo == null )
-                {
-                    replaceString = "";
-                    matcher.appendReplacement( buffer, replaceString );
-                    continue;
-                }
-                if ( dataElement.getType().equalsIgnoreCase( "int" ) )
-                {
-
-                    Double aggregatedValue = aggregationService.getAggregatedDataValue( dataElement, optionCombo,
-                        startDate, endDate, organisationUnit );
-                    if ( aggregatedValue == null )
-                    {
-                        replaceString = NULL_REPLACEMENT;
-                        deFlag2 = 1;
-                    }
-                    else
-                    {
-                        replaceString = String.valueOf( aggregatedValue );
-
-                        deFlag2 = 1;
-                    }
-
-                }
-                else
-                {
-                    deFlag1 = 1;
-                    deFlag2 = 0;
-                    PeriodType dePeriodType = getDataElementPeriodType( dataElement );
-                    List<Period> periodList = new ArrayList<Period>( periodService.getIntersectingPeriodsByPeriodType(
-                        dePeriodType, startDate, endDate ) );
-                    Period tempPeriod = new Period();
-                    if ( periodList == null || periodList.isEmpty() )
-                    {
-                        replaceString = "";
-                        matcher.appendReplacement( buffer, replaceString );
-                        continue;
-                    }
-                    else
-                    {
-                        tempPeriod = (Period) periodList.get( 0 );
-                    }
-
-                    DataValue dataValue = dataValueService.getDataValue( organisationUnit, dataElement, tempPeriod,
-                        optionCombo );
-
-                    if ( dataValue != null )
-                    {
-                        // Works for both text and boolean data types
-
-                        replaceString = dataValue.getValue();
-                    }
-
-                    else
-                        replaceString = "";
-
-                    if ( replaceString == null )
-                        replaceString = "";
-
-                }
-                matcher.appendReplacement( buffer, replaceString );
-
-                resultValue = replaceString;
-            }
-
-            matcher.appendTail( buffer );
-
-            if ( deFlag1 == 0 )
-            {
-
-                double d = 0.0;
-                try
-                {
-                    d = MathUtils.calculateExpression( buffer.toString() );
-                }
-                catch ( Exception e )
-                {
-                    d = 0.0;
-                    resultValue = "";
-                }
-                if ( d == -1 )
-                {
-                    d = 0.0;
-                    resultValue = "";
-                }
-                else
-                {
-
-                    // This is to display financial data as it is like 2.1476838
-                    resultValue = "" + d;
-
-                    // These lines are to display financial data that do not
-                    // have decimals
-                    d = d * 10;
-
-                    if ( d % 10 == 0 )
-                    {
-                        resultValue = "" + (int) d / 10;
-                    }
-
-                    d = d / 10;
-
-                    // These line are to display non financial data that do not
-                    // require decimals
-                    if ( !(reportModelTB.equalsIgnoreCase( "STATIC-FINANCIAL" )) )
-                        resultValue = "" + (int) d;
-
-                    // if ( resultValue.equalsIgnoreCase( "0" ) )
-                    // {
-                    // resultValue = "";
-                    // }
-                }
-
-            }
-            else
-            {
-                resultValue = buffer.toString();
-
-            }
-
-            if ( resultValue.equalsIgnoreCase( "" ) )
-                resultValue = " ";
-
-            return resultValue;
-        }
-        catch ( NumberFormatException ex )
-        {
-            throw new RuntimeException( "Illegal DataElement id", ex );
-        }
-    }
-
 }

=== 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-29 12:19:53 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/META-INF/dhis/beans.xml	2010-12-31 07:16:18 +0000
@@ -11,14 +11,14 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Reports Management start 07/08/2010 Global-->
+	<!-- Reports Management -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.ReportsListAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.ReportsListAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Management Addition Start-->
+	<!-- Report Management Addition -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.AddReportFormAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.AddReportFormAction"
 		scope="prototype">
@@ -33,9 +33,8 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Management Addition End-->
 	
-	<!-- Report Management Editing/Updation Start-->
+	<!-- Report Management Editing/Updation -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.UpdateReportForm"
 		class="org.hisp.dhis.reports.reportmanagement.action.UpdateReportForm"
 		scope="prototype">
@@ -52,25 +51,22 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Management Editing/Updation End-->
 	
-	<!-- Report Validation during Addition or Updation of Report Start-->
+	<!-- Report Validation during Addition or Updation of Report -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.ValidateReportAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.ValidateReportAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Validation during Addition or Updation of Report End-->
 	
-	<!-- Get Report details Start-->
+	<!-- Get Report details -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.GetReportAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.GetReportAction"
 		scope="prototype">
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Get Report details End-->
 	
 	<!-- Report Association -->
 	<bean
@@ -94,7 +90,6 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Association save start -->
 	<bean
 		id="org.hisp.dhis.reports.reportmanagement.action.DefineReportAssociationsAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.DefineReportAssociationsAction"
@@ -106,8 +101,6 @@
 		</property>
 		
 	</bean>
-	<!-- Report Association save end -->
-	<!-- Report Association Remove All start -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.UnselectAllAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.UnselectAllAction"
 		scope="prototype">
@@ -115,8 +108,6 @@
 			ref="org.hisp.dhis.oust.manager.SelectionTreeManager">
 		</property>
 	</bean>
-	
-	<!-- Select all at level start-->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.SelectLevelAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.SelectLevelAction"
 		scope="prototype">
@@ -124,9 +115,6 @@
 			ref="org.hisp.dhis.oust.manager.SelectionTreeManager">
 		</property>
 	</bean>
-	<!-- Select all at level end-->
-	
-	<!-- UnSelect all at level end-->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.UnselectLevelAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.UnselectLevelAction"
 		scope="prototype">
@@ -134,9 +122,6 @@
 			ref="org.hisp.dhis.oust.manager.SelectionTreeManager">
 		</property>
 	</bean>
-	<!-- UnSelect all at level start-->
-	
-	<!-- Select all at Group start-->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.SelectGroupAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.SelectGroupAction"
 		scope="prototype">
@@ -147,9 +132,6 @@
 			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService">
 		</property>
 	</bean>
-	<!-- Select all at Group end-->
-	
-	<!-- UnSelect all at Group start-->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.UnselectGroupAction"
 		class="org.hisp.dhis.reports.reportmanagement.action.UnselectGroupAction"
 		scope="prototype">
@@ -160,10 +142,6 @@
 			ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService">
 		</property>
 	</bean>
-	<!-- UnSelect all at Group end-->
-	
-	<!-- Report Association Remove All end -->
-	<!-- Report Association end -->
 	
 	<!-- Report Deletion -->
 	<bean id="org.hisp.dhis.reports.reportmanagement.action.DelReportAction"
@@ -172,15 +150,12 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
 	</bean>
-	<!-- Report Deletion end -->
-	<!-- Reports Management end 07/08/2010 Global-->
 	
 	<!-- Routine Reports -->
 	<bean
 		id="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserFormAction"
 		class="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserFormAction"
 		scope="prototype">
-		
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="organisationUnitGroupService" ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
 	</bean>
@@ -189,7 +164,6 @@
 		id="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserResultAction"
 		class="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserResultAction"
 		scope="prototype">
-		
 		<property name="statementManager" ref="statementManager"/>		
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
@@ -224,13 +198,8 @@
 		<property name="aggregationService">
 			<ref bean="org.hisp.dhis.aggregation.AggregationService"/>
 		</property>
-		<!-- added report service 23/08/2010-->
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
 		</property>
-		<!--	<property name="reportService">
-		<ref bean="org.hisp.dhis.reports.util.ReportService"/>
-		</property>-->
-		
 	</bean>
 	
 	<!-- Auto Reports -->
@@ -370,7 +339,6 @@
 		id="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserFormAction"
 		class="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserFormAction"
 		scope="prototype">
-		
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 	</bean>
 	
@@ -378,7 +346,6 @@
 		id="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserResultAction"
 		class="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserResultAction"
 		scope="prototype">
-		
 		<property name="statementManager" ref="statementManager"/>
 		<property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
 		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
@@ -444,7 +411,7 @@
 		</property>
 	</bean>
 	
-	<!-- Linelisting Reports 26/08/2010-->
+	<!-- Linelisting Reports -->
 	<bean
 		id="org.hisp.dhis.reports.linelisting.action.GenerateLinelistingReportAnalyserFormAction"
 		class="org.hisp.dhis.reports.linelisting.action.GenerateLinelistingReportAnalyserFormAction"
@@ -511,48 +478,20 @@
 		<property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
 	</bean>
 	
-	<!-- Oruunit wise Progress Reports 27/08/2010 -->
+	<!-- Orgunitwise Progress Reports -->
 	<bean
 		id="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportFormAction"
 		class="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportFormAction"
 		scope="prototype">
-		
-		<!--    <property name="reportService">
-		<ref bean="org.hisp.dhis.reports.util.ReportService"/>
-		</property>-->
 	</bean>
 	
 	<bean
 		id="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportResultAction"
 		class="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportResultAction"
 		scope="prototype">
-		
-		<property name="statementManager" ref="statementManager"/>
-		
-		<property name="dataElementCategoryOptionComboService">
-			<ref bean="org.hisp.dhis.dataelement.DataElementCategoryService"/>
-		</property>
-		<property name="periodService">
-			<ref bean="org.hisp.dhis.period.PeriodService"/>
-		</property>
-		<property name="organisationUnitService">
-			<ref bean="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-		</property>
-		<property name="dataElementService">
-			<ref bean="org.hisp.dhis.dataelement.DataElementService"/>
-		</property>
-		<property name="dataSetService">
-			<ref bean="org.hisp.dhis.dataset.DataSetService"/>
-		</property>
-		<property name="aggregationService">
-			<ref bean="org.hisp.dhis.aggregation.AggregationService"/>
-		</property>
-		<property name="dataValueService">
-			<ref bean="org.hisp.dhis.datavalue.DataValueService"/>
-		</property>
-		<property name="reportService">
-			<ref bean="org.hisp.dhis.reports.ReportService"/>
-		</property>
+		<property name="statementManager" ref="statementManager" />
+		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+		<property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
 	</bean>
 	
 	<!-- Meta Data Reports -->
@@ -560,39 +499,24 @@
 		id="org.hisp.dhis.reports.meta.action.GenerateMetaDataReportAnalyserFormAction"
 		class="org.hisp.dhis.reports.meta.action.GenerateMetaDataReportAnalyserFormAction"
 		scope="prototype">
-		
-		<property name="reportService" ref="org.hisp.dhis.reports.ReportService">
-		</property>
-		
+		<property name="reportService" ref="org.hisp.dhis.reports.ReportService" />
 	</bean>
 	
-	   <bean
+	<bean
 		id="org.hisp.dhis.reports.meta.action.GenerateMetaDataReportResultAction"
 		class="org.hisp.dhis.reports.meta.action.GenerateMetaDataReportResultAction"
 		scope="prototype">
-			<property name="statementManager" ref="statementManager"/>
-			<property name="dataElementService"
-				ref="org.hisp.dhis.dataelement.DataElementService"/>
-			<property name="organisationUnitService"
-				ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-			<property name="organisationUnitgroupService"
-				ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
-			<property name="dataSetService"
-				ref="org.hisp.dhis.dataset.DataSetService"/>
-			<property name="indicatorService"
-				ref="org.hisp.dhis.indicator.IndicatorService"/>
-			<property name="validationRuleService"
-				ref="org.hisp.dhis.validation.ValidationRuleService">
-			</property>
-			<property name="userStore" ref="org.hisp.dhis.user.UserStore">
-			</property>
-			<!--<property name="userCredentials" ref="org.hisp.dhis.user.UserCredentials">
-			</property>-->
-			<property name="expressionService" ref="org.hisp.dhis.expression.ExpressionService">
-			 </property>
-			 <property name="reportService" ref="org.hisp.dhis.reports.ReportService"/>
-		</bean>
-	
+		<property name="statementManager" ref="statementManager" />
+		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
+		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
+		<property name="organisationUnitgroupService" ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />
+		<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+		<property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
+		<property name="validationRuleService" ref="org.hisp.dhis.validation.ValidationRuleService" />
+		<property name="userStore" ref="org.hisp.dhis.user.UserStore" />
+		<property name="expressionService" ref="org.hisp.dhis.expression.ExpressionService" />
+		<property name="reportService" ref="org.hisp.dhis.reports.ReportService"/>
+	</bean>
 	
 	<!-- Advanced Reports -->
 	
@@ -1071,176 +995,6 @@
 		
 	</bean>
 	
-	<!-- DataSetReport Action -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.action.NextPeriodsAction"
-	class="org.hisp.dhis.reports.dataset.action.NextPeriodsAction">
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.action.PreviousPeriodsAction"
-	class="org.hisp.dhis.reports.dataset.action.PreviousPeriodsAction">
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.action.SelectReportAction"
-	class="org.hisp.dhis.reports.dataset.action.SelectReportAction"
-	scope="prototype">
-	<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService"/>
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	<property name="organisationUnitGroupService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
-	
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.action.GetDataSetReportTypeAction"
-	class="org.hisp.dhis.reports.dataset.action.GetDataSetReportTypeAction"
-	scope="prototype">
-	<property name="dataEntryFormService"
-	ref="org.hisp.dhis.dataset.DataEntryFormService"/>
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	</bean>
-	
-	<bean
-	id="org.hisp.dhis.reports.dataset.action.GenerateCustomDataSetReportAction"
-	class="org.hisp.dhis.reports.dataset.action.GenerateCustomDataSetReportAction"
-	scope="prototype">
-	<property name="dataMartStore" ref="org.hisp.dhis.datamart.DataMartStore"/>
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	<property name="dataElementOrderManager"
-	ref="org.hisp.dhis.order.manager.DataElementOrderManager"/>
-	<property name="dataEntryFormService"
-	ref="org.hisp.dhis.dataset.DataEntryFormService"/>
-	<property name="dataValueService"
-	ref="org.hisp.dhis.datavalue.DataValueService"/>
-	<property name="organisationUnitService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-	<property name="organisationUnitGroupService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
-	</bean>
-	
-	<bean
-	id="org.hisp.dhis.reports.dataset.action.GenerateDefaultDataSetReportAction"
-	class="org.hisp.dhis.reports.dataset.action.GenerateDefaultDataSetReportAction"
-	scope="prototype">
-	<property name="designGenerator"
-	ref="org.hisp.dhis.reports.dataset.generators.DesignGenerator"/>
-	<property name="tabularDesignGenerator"
-	ref="org.hisp.dhis.reports.dataset.generators.TabularDesignGenerator"/>
-	<property name="reportGenerator"
-	ref="org.hisp.dhis.reports.dataset.generators.ReportGenerator"/>
-	<property name="tabularReportGenerator"
-	ref="org.hisp.dhis.reports.dataset.generators.TabularReportGenerator"/>
-	<property name="dataElementService"
-	ref="org.hisp.dhis.dataelement.DataElementService"/>
-	<property name="reportStore"
-	ref="org.hisp.dhis.reports.dataset.report.ReportStore"/>
-	<property name="dataMartStore" ref="org.hisp.dhis.datamart.DataMartStore"/>
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	<property name="dataElementCategoryOptionComboService"
-	ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
-	<property name="dataElementOrderManager"
-	ref="org.hisp.dhis.order.manager.DataElementOrderManager"/>
-	<property name="dataElementCategoryComboService"
-	ref="org.hisp.dhis.dataelement.DataElementCategoryComboService"/>
-	<property name="dataElementCategoryService"
-	ref="org.hisp.dhis.dataelement.DataElementCategoryService"/>
-	<property name="dataValueService"
-	ref="org.hisp.dhis.datavalue.DataValueService"/>
-	<property name="organisationUnitService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-	<property name="organisationUnitGroupService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService"/>
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.action.GetViewFormStateAction"
-	class="org.hisp.dhis.reports.dataset.action.GetViewFormStateAction"
-	scope="prototype"/>
-	
-	<bean id="org.hisp.dhis.reports.dataset.action.PreviewReportAction"
-	class="org.hisp.dhis.reports.dataset.action.PreviewReportAction"
-	scope="prototype"/>
-	
-	<bean
-	id="org.hisp.dhis.reports.dataset.action.GenerateDataSetReportDataSourceAction"
-	class="org.hisp.dhis.reports.dataset.action.GenerateDataSetReportDataSourceAction"
-	scope="prototype">
-	<property name="processCoordinator" ref="processCoordinator"/>
-	<property name="currentUserService"
-	ref="org.hisp.dhis.user.CurrentUserService"/>
-	<property name="selectedStateManager"
-	ref="org.hisp.dhis.reports.dataset.state.SelectedStateManager"/>
-	</bean>
-	-->
-	<!-- Selection State -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.state.SelectedStateManager"
-	class="org.hisp.dhis.reports.dataset.state.DefaultSelectedStateManager">
-	<property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService"/>
-	<property name="selectionTreeManager"
-	ref="org.hisp.dhis.oust.manager.SelectionTreeManager"/>
-	<property name="periodService" ref="org.hisp.dhis.period.PeriodService"/>
-	</bean>
-	-->
-	<!-- DesignGenerator -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.generators.DesignGenerator"
-	class="org.hisp.dhis.reports.dataset.generators.JasperDesignGenerator">
-	<property name="locationManager"
-	ref="org.hisp.dhis.external.location.LocationManager"/>
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.generators.TabularDesignGenerator"
-	class="org.hisp.dhis.reports.dataset.generators.JasperTabularDesignGenerator">
-	<property name="locationManager"
-	ref="org.hisp.dhis.external.location.LocationManager"/>
-	</bean>
-	-->
-	<!-- ReportGenerator -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.generators.ReportGenerator"
-	class="org.hisp.dhis.reports.dataset.generators.JasperReportGenerator">
-	<property name="locationManager"
-	ref="org.hisp.dhis.external.location.LocationManager"/>
-	</bean>
-	
-	<bean id="org.hisp.dhis.reports.dataset.generators.TabularReportGenerator"
-	class="org.hisp.dhis.reports.dataset.generators.JasperTabularReportGenerator">
-	<property name="locationManager"
-	ref="org.hisp.dhis.external.location.LocationManager"/>
-	</bean>
-	-->
-	<!-- ReportStore -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.report.ReportStore"
-	class="org.hisp.dhis.reports.dataset.report.XmlReportStore"
-	scope="prototype">
-	<property name="reportDataAccess"
-	ref="org.hisp.dhis.reports.dataset.dataaccess.ReportDataAccess"/>
-	<property name="locationManager"
-	ref="org.hisp.dhis.external.location.LocationManager"/>
-	<property name="reportDisplayProperty" value="name"/>
-	</bean>
-	-->
-	<!-- DataAccess -->
-	<!--
-	<bean id="org.hisp.dhis.reports.dataset.dataaccess.ReportDataAccess"
-	class="org.hisp.dhis.reports.dataset.dataaccess.Dhis20ReportDataAccess"
-	scope="prototype">
-	<property name="organisationUnitService"
-	ref="org.hisp.dhis.organisationunit.OrganisationUnitService"/>
-	<property name="indicatorService"
-	ref="org.hisp.dhis.indicator.IndicatorService"/>
-	<property name="dataElementService"
-	ref="org.hisp.dhis.dataelement.DataElementService"/>
-	</bean>
-	-->
 	<!-- Report Service -->
 	<bean id="org.hisp.dhis.reports.util.ReportService"
 		class="org.hisp.dhis.reports.util.ReportService" scope="prototype">

=== modified file 'local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties'
--- local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties	2010-12-29 12:19:53 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/org/hisp/dhis/reports/i18n_module.properties	2010-12-31 07:16:18 +0000
@@ -2,6 +2,7 @@
 routine_ra = Routine Report Analyser
 physical_output_ra = Quarterly Physical Output Report
 periodwise_progress_ra = PeriodWise Progress Report Analyser
+orgunitwise_progress_ra = OrganisationunitWise Progress Report Analyser
 aggregation_ra = Aggregation Reports Analyser
 periodtype = PeriodType
 organisationunit = OrganisationUnit

=== 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-12-22 07:29:08 +0000
+++ local/in/dhis-web-reports-national/src/main/resources/struts.xml	2010-12-31 07:16:18 +0000
@@ -4,11 +4,10 @@
 "http://struts.apache.org/dtds/struts-2.0.dtd";>
 <struts>
     
-   <!-- use the DHIS web portal default -->
-  <include file="dhis-web-commons.xml"/>
+	<!-- use the DHIS web portal default -->
+	<include file="dhis-web-commons.xml"/>
 
-	<package name="dhis-web-reports" extends="dhis-web-commons"
-		namespace="/dhis-web-reports">
+	<package name="dhis-web-reports" extends="dhis-web-commons" namespace="/dhis-web-reports">
 		
 		<action name="index"
 			class="org.hisp.dhis.reports.action.ReportsHomePageAction">
@@ -27,7 +26,7 @@
 			<param name="requiredAuthorities">F_REPORT_MANAGEMENT_LIST</param>
 		</action>
 		
-		<!-- Report Management Addition Start-->
+		<!-- Report Management Addition -->
 		<action name="addReportForm"
 			class="org.hisp.dhis.reports.reportmanagement.action.AddReportFormAction">
 			<result name="success" type="velocity">/main.vm</result>
@@ -39,9 +38,8 @@
 			class="org.hisp.dhis.reports.reportmanagement.action.AddReportAction">
 			<result name="success" type="redirect">reportManagement.action</result>
 		</action>
-		<!-- Report Management Addition End-->
 		
-		<!-- Report Editing/Updation Start-->
+		<!-- Report Editing/Updation -->
 		<action name="editReportForm"
 			class="org.hisp.dhis.reports.reportmanagement.action.UpdateReportForm">
 			<result name="success" type="velocity">/main.vm</result>
@@ -51,93 +49,70 @@
 		</action>
 		<action name="editReport"
 			class="org.hisp.dhis.reports.reportmanagement.action.UpdateReportAction">
-			<result name="success" type="redirect">
-				reportManagement.action</result>
+			<result name="success" type="redirect">reportManagement.action</result>
 		</action>
-		<!-- Report Editing/Updation End-->
-		
-		
-		<!-- Report Management Validation during Addition or Updation of Report Start-->
+		
+		<!-- Report Management Validation during Addition or Updation of Report -->
 		<action name="validateReport"
 			class="org.hisp.dhis.reports.reportmanagement.action.ValidateReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responseReportManagementSuccess.vm</result>
-			<result name="input" type="velocity-xml">
-				/dhis-web-reports/responseReportManagementInput.vm</result>
+			<result name="success" type="velocity-xml">/dhis-web-reports/responseReportManagementSuccess.vm</result>
+			<result name="input" type="velocity-xml">/dhis-web-reports/responseReportManagementInput.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 		
-		<!-- Report Management Validation during Addition or Updation of Report End-->
-		
-		<!-- Get Report details Start-->
-		
+		<!-- Get Report details -->
 		<action name="getReport"
 			class="org.hisp.dhis.reports.reportmanagement.action.GetReportAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responseReportManagementObject.vm</result>
+			<result name="success" type="velocity-xml">/dhis-web-reports/responseReportManagementObject.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
-		<!-- Get Report details end -->
-		
-		<!-- Report Association start -->
-		
+		
+		<!-- Report Association -->
 		<action name="defineReportAssociationsForm"
 			class="org.hisp.dhis.reports.reportmanagement.action.GetNumberOfLevelsAction">
-			<result name="success" type="chain">
-				defineReportAssociationsFormChain</result>
+			<result name="success" type="chain">defineReportAssociationsFormChain</result>
 		</action>
 		<action name="defineReportAssociationsFormChain"
 			class="org.hisp.dhis.reports.reportmanagement.action.SetupAssociationsTreeAction">
 			<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>
-		<!-- Report Association save start -->
+		
+		<!-- Report Association save -->
 		<action name="defineReportAssociations"
 			class="org.hisp.dhis.reports.reportmanagement.action.DefineReportAssociationsAction">
-			<result name="success" type="redirect">
-				reportManagement.action</result>
+			<result name="success" type="redirect">reportManagement.action</result>
 		</action>
-		<!-- Report Association save end -->
 		
-		<!-- Report Association Remove All start -->
+		<!-- Report Association Remove All -->
 		<action name="unselectAll"
 			class="org.hisp.dhis.reports.reportmanagement.action.UnselectAllAction">
-			<result name="success" type="chain">
-				getNumberOfLevelsSelectLevelChain</result>
+			<result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
 		</action>
-		<!-- Report Association Remove All end -->
 		
-		<!-- Report Association select/unselect All at Level start -->
+		<!-- Report Association select/unselect All at Level -->
 		<action name="selectLevel"
 			class="org.hisp.dhis.reports.reportmanagement.action.SelectLevelAction">
-			<result name="success" type="chain">
-				getNumberOfLevelsSelectLevelChain</result>
+			<result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
 		</action>
 		<action name="unselectLevel"
 			class="org.hisp.dhis.reports.reportmanagement.action.UnselectLevelAction">
-			<result name="success" type="chain">
-				getNumberOfLevelsSelectLevelChain</result>
-			
+			<result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
 		</action>
-		<!-- Report Association select/unselect All at Level end -->
 		
-		<!-- Report Association select/unselect All at Group start -->
+		<!-- Report Association select/unselect All at Group -->
 		<action name="selectgroup"
 			class="org.hisp.dhis.reports.reportmanagement.action.SelectGroupAction">
-			<result name="success" type="chain">
-				getNumberOfLevelsSelectLevelChain</result>
+			<result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
 		</action>
 		<action name="unselectgroup"
 			class="org.hisp.dhis.reports.reportmanagement.action.UnselectGroupAction">
-			<result name="success" type="chain">
-				getNumberOfLevelsSelectLevelChain</result>
+			<result name="success" type="chain">getNumberOfLevelsSelectLevelChain</result>
 		</action>
-		<!-- Report Association select/unselect All at Group end -->
 		
-		<!-- Chain for Associations start-->
+		<!-- Chain for Associations -->
 		<action name="getNumberOfLevelsSelectLevelChain"
 			class="org.hisp.dhis.reports.reportmanagement.action.GetNumberOfLevelsAction">
 			<result name="success" type="chain">getReportSelectLevelChain</result>
@@ -149,31 +124,24 @@
 			<param name="page">/dhis-web-reports/reportAssociations.vm</param>
 			<param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/reportManagementAssociations.js</param>
 		</action>
-		<!-- Chain for Associations end-->
 		
-		<!-- Report Association end -->
 		<!-- Report Deletion -->
 		<action name="delReport"
 			class="org.hisp.dhis.reports.reportmanagement.action.DelReportAction">
-			<result name="success" type="redirect">
-				reportManagement.action</result>
+			<result name="success" type="redirect">reportManagement.action</result>
 		</action>
-		<!-- Report Deletion end -->
-		<!-- Reports Management end 07/08/2010 Global-->
 		
 		<!-- Routine Reports -->
 		<action name="routineReportAnalyser"
 			class="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/routineReportAnalysisFront.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForRoutineReport.vm</param>
+			<param name="page">/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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_ROUTINE</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateRoutineReport"
 			class="org.hisp.dhis.reports.routine.action.GenerateRoutineReportAnalyserResultAction">
 			<result name="success" type="stream">
@@ -190,12 +158,10 @@
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/edReportForm.vm</param>
 			<param name="menu">/dhis-web-reports/menu.vm</param>
-			<param name="javascripts">
-				javascript/reports.js,javascript/date.js</param>
+			<param name="javascripts">javascript/reports.js,javascript/date.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<param name="requiredAuthorities">F_EDREPORT_GENERATE</param>
 		</action>
-		
 		<action name="generateEDReport"
 			class="org.hisp.dhis.reports.ed.action.EDReportResultAction">
 			<result name="success" type="stream">
@@ -211,14 +177,12 @@
 			class="org.hisp.dhis.reports.activeplan.action.ActivePlanReportsFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/activePlanReportsForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForActivePlan.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</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForActivePlan.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</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_ACTIVITYPLAN</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateActivePlanReport"
 			class="org.hisp.dhis.reports.activeplan.action.ActivePlanReportsResultAction">
 			<result name="success" type="stream">
@@ -228,20 +192,15 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		
 		<action name="activePlanFeedbackReportsAnalyser"
 			class="org.hisp.dhis.reports.activeplan.action.ActivePlanFeedBackFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/activePlanFeedBackForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForActivePlan.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="page">/dhis-web-reports/activePlanFeedBackForm.vm</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForActivePlan.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="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateActivePlanFeedbackReport"
 			class="org.hisp.dhis.reports.activeplan.action.ActivePlanFeedBackResultAction">
 			<result name="success" type="stream">
@@ -256,16 +215,13 @@
 		<action name="benificiaryInfoReportsAnalyser"
 			class="org.hisp.dhis.reports.benificiaryinfo.action.BenificiaryInfoReportsFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/benificiaryInfoReportsForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForBenificiaryInfo.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</param>
+			<param name="page">/dhis-web-reports/benificiaryInfoReportsForm.vm</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForBenificiaryInfo.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</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_BENIFICIARY_INFO</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateBenificiaryInfoReport"
 			class="org.hisp.dhis.reports.benificiaryinfo.action.BenificiaryInfoReportsResultAction">
 			<result name="success" type="stream">
@@ -281,14 +237,12 @@
 			class="org.hisp.dhis.reports.portal.action.PortalReportsFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/portalReportForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForPortalReport.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</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForPortalReport.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</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_NBITS_PORTAL</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generatePortalReport"
 			class="org.hisp.dhis.reports.portal.action.PortalReportsResultAction">
 			<result name="success" type="stream">
@@ -303,42 +257,33 @@
 		<action name="autoReportAnalyser"
 			class="org.hisp.dhis.reports.auto.action.GenerateAutoReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/autoReportAnalysisFront.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForAutoReport.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</param>
+			<param name="page">/dhis-web-reports/autoReportAnalysisFront.vm</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForAutoReport.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</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateAutoReport"
 			class="org.hisp.dhis.reports.auto.action.GenerateAutoReportAnalyserResultAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/autoReportSucess.vm</param>
 			<param name="menu">/dhis-web-reports/menu.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</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</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
-			
 		</action>
 		
-		<!--Aggregation Report 25/08/2010 start-->
+		<!--Aggregation Report -->
 		<action name="aggregationReportAnalyser"
 			class="org.hisp.dhis.reports.aggregation.action.GenerateAggregationReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/aggregationReportAnalysisFront.vm</param>
-			<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/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="page">/dhis-web-reports/aggregationReportAnalysisFront.vm</param>
+			<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/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>
+			<param name="requiredAuthorities">F_REPORT_AGGREGATION</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateAggregationReport"
 			class="org.hisp.dhis.reports.aggregation.action.GenerateAggregationReportAnalyserResultAction">
 			<result name="success" type="stream">
@@ -349,22 +294,17 @@
 			</result>
 		</action>
 		
-		<!-- Aggregation Report 25/08/2010 end -->
-		
 		<!-- Feedback Reports -->
 		<action name="feedbackReportAnalyser"
 			class="org.hisp.dhis.reports.feedback.action.GenerateFeedbackReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/feedbackReportAnalysisFront.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<param name="page">/dhis-web-reports/feedbackReportAnalysisFront.vm</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_FEEDBACK</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateFeebackReport"
 			class="org.hisp.dhis.reports.feedback.action.GenerateFeedbackReportAnalyserResultAction">
 			<result name="success" type="stream">
@@ -379,16 +319,13 @@
 		<action name="upwardReportAnalyser"
 			class="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/upwardReportAnalysisFront.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<param name="page">/dhis-web-reports/upwardReportAnalysisFront.vm</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_GOI</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateUpwardReport"
 			class="org.hisp.dhis.reports.upward.action.GenerateUpwardReportAnalyserResultAction">
 			<result name="success" type="stream">
@@ -407,9 +344,9 @@
 			<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>
+			<param name="requiredAuthorities">F_REPORT_DATASETLOCK</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateDataSetLockReportResult"
 			class="org.hisp.dhis.reports.datasetlock.action.GenerateDataSetLockReportResultAction">
 			<result name="success" type="stream">
@@ -419,39 +356,32 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		
 		<action name="getOrgUnitName"
 			class="org.hisp.dhis.reports.datasetlock.action.GetOrgUnitNameAction">
 			<result name="success" type="velocity-xml">/dhis-web-reports/ougUnitName.vm</result>
 		</action>
 		<action name="getPeriodsForLock"
 			class="org.hisp.dhis.reports.datasetlock.action.GetPeriodsForLockAction">
-			<result name="success" type="velocity">
-				/dhis-web-commons/ajax/xmlPeriods.vm</result>
+			<result name="success" type="velocity">/dhis-web-commons/ajax/xmlPeriods.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
-		
 		<action name="getDataSetsForLockAction"
 			class="org.hisp.dhis.reports.datasetlock.action.GetDataSetsForLockAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responseDataSetLock.vm</result>
+			<result name="success" type="velocity-xml">/dhis-web-reports/responseDataSetLock.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 		
-		<!-- Linelisting Reports 26/08/2010-->
+		<!-- Linelisting Reports -->
 		<action name="linelistingReportAnalyser"
 			class="org.hisp.dhis.reports.linelisting.action.GenerateLinelistingReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/linelstingReportAnalyserFront.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<param name="page">/dhis-web-reports/linelstingReportAnalyserFront.vm</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_LINELIST</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateLinelistingReport"
 			class="org.hisp.dhis.reports.linelisting.action.GenerateLinelistingReportAnalyserResultAction">
 			<result name="success" type="stream">
@@ -462,20 +392,17 @@
 			</result>
 		</action>
 		
-		<!-- Progress Reports 26/08/2010-->
+		<!-- Progress Reports -->
 		<action name="periodWiseprogressReportAnalyser"
 			class="org.hisp.dhis.reports.periodwiseprogress.action.GeneratePeriodWiseProgressReportAnalyserFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/periodWiseprogressReportAnalysisFront.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<param name="page">/dhis-web-reports/periodWiseprogressReportAnalysisFront.vm</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_PERIODWISE_PROGRESS</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generatePeriodWiseProgressReport"
 			class="org.hisp.dhis.reports.periodwiseprogress.action.GeneratePeriodWiseProgressAnalyserResultAction">
 			<result name="success" type="stream">
@@ -486,20 +413,17 @@
 			</result>
 		</action>
 		
-		<!-- Oruunit wise Progress Reports 27/08/2010-->
+		<!-- Oruunit wise Progress Reports -->
 		<action name="ouWiseProgressReportAnalyser"
 			class="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/ouWiseProgressReportFront.vm</param>
-			<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/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="page">/dhis-web-reports/ouWiseProgressReportFront.vm</param>
+			<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/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>
+			<param name="requiredAuthorities">F_REPORT_ORGUNITWISE_PROGRESS</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="ouwisegenerateProgressReport"
 			class="org.hisp.dhis.reports.ouwiseprogress.action.GenerateOuWiseProgressReportResultAction">
 			<result name="success" type="stream">
@@ -526,18 +450,16 @@
                 <param name="contentType">application/vnd.ms-excel</param>
                 <param name="inputName">inputStream</param>
                 <param name="contentDisposition">filename="${fileName}"</param>
-                <param name="bufferSize">1024</param>S </result>
+                <param name="bufferSize">1024</param>
+			</result>
         </action>
 		
-		
-		
 		<!-- Advanced Reports -->
 		<action name="advancedReportAnalyser"
 			class="org.hisp.dhis.reports.advanced.action.GenerateAdvancedReportsFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/advancedReportsForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForAdvanced.vm</param>
+			<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/reportManagement.js,javascript/hashtable.js
 				,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
@@ -545,7 +467,6 @@
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateAdvancedReport"
 			class="org.hisp.dhis.reports.advanced.action.GenerateAdvancedReportResultAction">
 			<result name="success" type="stream">
@@ -561,14 +482,11 @@
 			class="org.hisp.dhis.reports.leprosy.action.LeprosyReportFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/leprosyReportsForm.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateNLEPReport"
 			class="org.hisp.dhis.reports.leprosy.action.LeprosyReportResultAction">
 			<result name="success" type="stream">
@@ -578,19 +496,17 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		<!-- Malarya Reports -->
+
+		<!-- Malaria Reports -->
 		<action name="malaryaForm"
 			class="org.hisp.dhis.reports.malarya.action.GenerateMalaryaReportFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/MalaryaReportsForm.vm</param>
-			<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/reportManagement.js,javascript/hashtable.js</param>
+			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateMalaryReport"
 			class="org.hisp.dhis.reports.malarya.action.GenerateMalaryaReportResultAction">
 			<result name="success" type="stream">
@@ -606,14 +522,11 @@
 			class="org.hisp.dhis.reports.grading.action.GenerateGradingReportFormAction">
 			<result name="success" type="velocity">/main.vm</result>
 			<param name="page">/dhis-web-reports/gradingReportForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForGradingReport.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/hashtable.js,javascript/grading.js</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForGradingReport.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/hashtable.js,javascript/grading.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateGradingReport"
 			class="org.hisp.dhis.reports.grading.action.GenerateGradingReportResultAction">
 			<result name="success" type="stream">
@@ -623,7 +536,6 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		
 		<action name="generateImmChildGradingReport"
 			class="org.hisp.dhis.reports.grading.action.GenerateImmChildGradingReportAction">
 			<result name="success" type="stream">
@@ -633,7 +545,6 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		
 		<action name="generateSelChildGradingReport"
 			class="org.hisp.dhis.reports.grading.action.GenerateSelChildGradingReportAction">
 			<result name="success" type="stream">
@@ -643,20 +554,15 @@
 				<param name="bufferSize">1024</param>
 			</result>
 		</action>
-		
 		<action name="gradingAbstration"
 			class="org.hisp.dhis.reports.grading.action.GradingAbstrationFormAction">
 			<result name="success" type="velocity">/main.vm</result>
-			<param name="page">
-				/dhis-web-reports/gradingAbstractionForm.vm</param>
-			<param name="menu">
-				/dhis-web-reports/menuWithTreeForGradingAbstReport.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/hashtable.js</param>
+			<param name="page">/dhis-web-reports/gradingAbstractionForm.vm</param>
+			<param name="menu">/dhis-web-reports/menuWithTreeForGradingAbstReport.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/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="gradingAbstractionResult"
 			class="org.hisp.dhis.reports.grading.action.GradingAbstractionResultAction">
 			<result name="success" type="stream">
@@ -726,7 +632,6 @@
 			<param name="stylesheets">css/StylesForTags.css</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
-		
 		<action name="generateRankingReport"
 			class="org.hisp.dhis.reports.ranking.action.GenerateRankingReportResultAction">
 			<result name="success" type="stream">
@@ -745,23 +650,20 @@
 			<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/reportManagement.js,javascript/hashtable.js</param>
 			<param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_POPULATE_USERS</param>
 			<interceptor-ref name="organisationUnitTreeStack"/>
 		</action>
 		
 		<!-- AJAX Requests -->
 		<action name="getDataElements"
 			class="org.hisp.dhis.reports.action.GetDataElementsAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responseDataElement.vm</result>
-			<!--<interceptor-ref name="transactionStack"/>-->
+			<result name="success" type="velocity-xml">/dhis-web-reports/responseDataElement.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 		
 		<action name="getPeriods"
 			class="org.hisp.dhis.reports.action.GetPeriodsAction">
-			<result name="success" type="velocity-xml">
-				/dhis-web-reports/responsePeriod.vm</result>
-			<!--<interceptor-ref name="transactionStack"/>-->
+			<result name="success" type="velocity-xml">/dhis-web-reports/responsePeriod.vm</result>
 			<param name="onExceptionReturn">plainTextError</param>
 		</action>
 		
@@ -1129,21 +1031,19 @@
 			</result>
 		</action>
 		
-		<!-- quarterly physical  reports -->
-        <action name = "quarterlyPhysicalReport" 
-            class = "org.hisp.dhis.reports.physical.action.PhysicalReportFormAction">
-              <result name="success" type="velocity">/main.vm</result>
-           <param name="page">
-                /dhis-web-reports/physicalReportform.vm</param>
-            <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/reportManagement.js,javascript/hashtable.js</param>
+		<!-- Quarterly PhysicalOutput Reports -->
+        <action name="quarterlyPhysicalReport" 
+			class="org.hisp.dhis.reports.physical.action.PhysicalReportFormAction">
+            <result name="success" type="velocity">/main.vm</result>
+			<param name="page">/dhis-web-reports/physicalReportform.vm</param>
+            <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/reportManagement.js,javascript/hashtable.js</param>
             <param name="stylesheets">css/StylesForTags.css</param>
+			<param name="requiredAuthorities">F_REPORT_PHYSICALOP</param>
             <interceptor-ref name="organisationUnitTreeStack"/>
         </action>
-            <action name="generatePhysicalReport"
-            class="org.hisp.dhis.reports.physical.action.GeneratePhysicalReportResultAction">
+        <action name="generatePhysicalReport"
+			class="org.hisp.dhis.reports.physical.action.GeneratePhysicalReportResultAction">
             <result name="success" type="stream">
                 <param name="contentType">application/vnd.ms-excel</param>
                 <param name="inputName">inputStream</param>
@@ -1157,12 +1057,11 @@
             class="org.hisp.dhis.reports.csreview.action.GenerateCSReviewReportFormAction">
             <result name="success" type="velocity">/main.vm</result>
             <param name="page">/dhis-web-reports/csReviewReportFront.vm</param>
-            <param name="menu">
-                /dhis-web-reports/menuWithTreeForCSReviewReport.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/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>
+			<param name="requiredAuthorities">F_REPORT_CSREVIEW</param>
             <interceptor-ref name="organisationUnitTreeStack"/>
-            
         </action>
         <action name="generateCSReviewReportResult" class="org.hisp.dhis.reports.csreview.action.GenerateCSReviewReportResultAction">
             <result name="success" type="stream">
@@ -1173,8 +1072,5 @@
             </result>
         </action>
 		
-		
-	
-		
 	</package>
 </struts>

=== 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-22 07:29:08 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menu.vm	2010-12-31 07:16:18 +0000
@@ -1,32 +1,75 @@
 <h2>Report Analyser</h2>
 
 #if( $auth.hasAccess( "dhis-web-reports", "reportManagement") )
-<ul>
-    <li>Report Management</li>
-    <ul>
-        <li><a href = "reportManagement.action">Report Management</a></li>
-    </ul>
-</ul>
-#end
-<ul>
-    <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 = "routineReportAnalyser.action">Routine Reports</a></li>
-        <li><a href = "feedbackReportAnalyser.action">Feedback Reports</a></li>
-        <li><a href = "aggregationReportAnalyser.action">Aggregation Reports</a></li>
-        <li><a href = "linelistingReportAnalyser.action">Linelisting Reports</a></li>
-        <li><a href = "periodWiseprogressReportAnalyser.action">Periodwise Progress Reports</a></li>
-        <li><a href = "ouWiseProgressReportAnalyser.action">Orgunitwise Progress Reports</a></li>
-        <li><a href = "metaDataReportAnalyser.action">Meta Data Reports</a></li>
-        <li><a href = "benificiaryInfoReportsAnalyser.action">NBITS Benificiary Info</a></li>
-        <li><a href = "activePlanReportsAnalyser.action">NBITS Reports</a></li>
-        <li><a href = "portalReportsAnalyser.action">NBITS Portal Reports</a></li>
-		<li><a href = "dataSetLockReportAnalyser.action">DataSet Lock Reports</a></li>
-        <li><a href = "quarterlyPhysicalReport.action ">Quarterly Physical Output Reports</a></li>              
-        <li><a href = "csReviewReportForm.action">CS Review Reports</a></li>  
-        <!--<li><a href = "advancedReportAnalyser.action">Advanced Reports</a></li>-->
-		<li><a href = "populateUsers.action">Populate Users</a></li>
-    </ul>
-</ul>
+	<ul>
+		<li>Report Management</li>
+		<ul>
+			<li><a href = "reportManagement.action">Report Management</a></li>
+		</ul>
+	</ul>
+#end
+
+#if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") )
+	<ul>
+		<li>Report Analysis</li>
+		<ul>
+			#if( $auth.hasAccess( "dhis-web-reports", "upwardReportAnalyser") )
+				<li><a href = "upwardReportAnalyser.action">GOI Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "edReportForm") )
+				<li><a href = "edReportForm.action">ED Report</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "routineReportAnalyser") )
+				<li><a href = "routineReportAnalyser.action">Routine Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "feedbackReportAnalyser") )
+				<li><a href = "feedbackReportAnalyser.action">Feedback Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "aggregationReportAnalyser") )
+				<li><a href = "aggregationReportAnalyser.action">Aggregation Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "linelistingReportAnalyser") )
+				<li><a href = "linelistingReportAnalyser.action">Linelisting Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "periodWiseprogressReportAnalyser") )
+				<li><a href = "periodWiseprogressReportAnalyser.action">Periodwise Progress Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "ouWiseProgressReportAnalyser") )
+				<li><a href = "ouWiseProgressReportAnalyser.action">Orgunitwise Progress Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "metaDataReportAnalyser") )
+				<li><a href = "metaDataReportAnalyser.action">Meta Data Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "dataSetLockReportAnalyser") )
+				<li><a href = "dataSetLockReportAnalyser.action">DataSet Lock Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "quarterlyPhysicalReport") )
+				<li><a href = "quarterlyPhysicalReport.action ">Quarterly Physical Output Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "csReviewReportForm") )
+				<li><a href = "csReviewReportForm.action">CS Review Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "populateUsers") )
+				<li><a href = "populateUsers.action">Populate Users</a></li>
+			#end
+			<!--<li><a href = "advancedReportAnalyser.action">Advanced Reports</a></li>-->	
+		</ul>
+	</ul>
+#end
+
+#if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") )
+	<ul>
+		<li>NameBased Reports</li>
+		<ul>
+			#if( $auth.hasAccess( "dhis-web-reports", "benificiaryInfoReportsAnalyser") )
+				<li><a href = "benificiaryInfoReportsAnalyser.action">NBITS Benificiary Info</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "activePlanReportsAnalyser") )
+				<li><a href = "activePlanReportsAnalyser.action">NBITS Reports</a></li>
+			#end
+			#if( $auth.hasAccess( "dhis-web-reports", "portalReportsAnalyser") )
+				<li><a href = "portalReportsAnalyser.action">NBITS Portal Reports</a></li>
+			#end
+		</ul>
+	</ul>
+#end
\ No newline at end of file

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForOuWiseProgress.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForOuWiseProgress.vm	2010-08-28 10:15:38 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/menuWithTreeForOuWiseProgress.vm	2010-12-31 07:16:18 +0000
@@ -7,35 +7,33 @@
         </li>
     </ul>
 </ul>
+
 <div style=" float:right; font-size:6pt; cursor:pointer; margin-top:-15px; ">
-        <a href="index.action">
-          <img src="images/goback.png" width="36" height="30" alt="$i18n.getString( "go_back" )"></a>
+	<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" )
 
 <!-- The script that registeres selctions in the orgunit tree -->
 <script type="text/javascript">
 
-function orgUnitHasBeenSelected( orgUnitIds )
-{    
-
-    document.reportForm.ouIDTB.value = orgUnitIds;
-    reportTypeName = document.reportForm.reportTypeNameTB.value;
-	
-	if(orgUnitIds == null || orgUnitIds == "" )
-	{
-		return;
-	}
-	
-    if(orgUnitIds !=null)
-	   {
-	    // getOUDetailsForOuWiseProgressReport(orgUnitIds);
-	     getReports(orgUnitIds, reportTypeName );
-	   }
-	
-	}
-
-selection.setListenerFunction( orgUnitHasBeenSelected );
+	function orgUnitHasBeenSelected( orgUnitIds )
+	{    
+		document.reportForm.ouIDTB.value = orgUnitIds;
+		reportTypeName = document.reportForm.reportTypeNameTB.value;
+		
+		if(orgUnitIds == null || orgUnitIds == "" )
+		{
+			return;
+		}
+		
+		if( orgUnitIds != null )
+		{
+			 getReports(orgUnitIds, reportTypeName );
+		}
+	}
+	
+	selection.setListenerFunction( orgUnitHasBeenSelected );
 
 </script>
 

=== modified file 'local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ouWiseProgressReportFront.vm'
--- local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ouWiseProgressReportFront.vm	2010-12-09 10:23:58 +0000
+++ local/in/dhis-web-reports-national/src/main/webapp/dhis-web-reports/ouWiseProgressReportFront.vm	2010-12-31 07:16:18 +0000
@@ -1,55 +1,21 @@
 
-		<script>
-
-			//Global Variables
-		            
-			var reportModels = new HashTable();
-			var reportFileNames = new HashTable();
-						
-		    // Report ids and its Models
-			#foreach($report in $reportList)
-				var reportId = ""+"$report.id";
-			    reportModels.put(reportId,"$report.model");
-				reportFileNames.put(reportId,"$report.fileName");
-			#end
-
-			 // OrganisationUnit ids and its Names
-			var orgUnits = new HashTable();
-			#foreach($orgUnit in $organisationUnits)
-				var orgUnitId = ""+$orgUnit.getId();
-			    orgUnits.put(orgUnitId,"$orgUnit.getShortName()");
-			#end
-			            
-			// OrganisationUnit ids and its Level
-			var orgUnitLevels = new HashTable();
-			#foreach($orgUnit in $organisationUnits)
-				var orgUnitId = ""+$orgUnit.getId();
-			    orgUnitLevels.put(orgUnitId,"$organisationUnitService.getLevelOfOrganisationUnit( $orgUnit )");
-			#end
-			            					
-			function formValidations()
-			{			            
-				var reportListIndex = document.reportForm.reportList.selectedIndex;
-			    var startDateValue = document.reportForm.startDate.value;
-				var endDateValue = document.reportForm.endDate.value;
-				var orgunitIdValue = document.reportForm.ouIDTB.value;
-			               			            
-			    if(reportListIndex < 0 || document.reportForm.reportList.options[reportListIndex].text == null) {alert("Please Select Report"); return false;}
-			    else if(startDateValue == null || startDateValue== "" || endDateValue == null || endDateValue=="") {alert("Please Select Period"); return false;}
-				else if(startDateValue > endDateValue) {alert("Starte Date is Greaterthan End Date"); return false;}
-				else if(orgunitIdValue == null || orgunitIdValue == "") {alert("Please Select OrganisationUnit"); return false;}
-
-				//document.reportForm.reportModelTB.value = reportModels.get(document.reportForm.reportList.options[reportListIndex].value);
-				//document.reportForm.reportFileNameTB.value = reportFileNames.get(document.reportForm.reportList.options[reportListIndex].value);
-                document.forms['reportForm'].submit();
-			    //return true;
-			}
-
-
-//-----------------------------------------------------------------------
-//init jQuery validation for reportForm
-//@added validation for all fields and additional rules alphanumericwithbasicpuncspaces, date and url.
-//-----------------------------------------------------------------------
+<script>
+
+	function formValidations()
+	{			            
+		var reportListIndex = document.reportForm.reportList.selectedIndex;
+		var startDateValue = document.reportForm.startDate.value;
+		var endDateValue = document.reportForm.endDate.value;
+		var orgunitIdValue = document.reportForm.ouIDTB.value;
+														
+		if(reportListIndex < 0 || document.reportForm.reportList.options[reportListIndex].text == null) {alert("Please Select Report"); return false;}
+		else if(startDateValue == null || startDateValue== "" || endDateValue == null || endDateValue=="") {alert("Please Select Period"); return false;}
+		else if(startDateValue > endDateValue) {alert("Starte Date is Greaterthan End Date"); return false;}
+		else if(orgunitIdValue == null || orgunitIdValue == "") {alert("Please Select OrganisationUnit"); return false;}
+		
+		document.forms['reportForm'].submit();
+	}
+
 	jQuery(document).ready(
 			function()
 			{
@@ -64,72 +30,73 @@
 				jQuery("#name").focus();
 			}
 	);
-		</script>
-		<h1>Organisationunit Wise Progress Report</h1><hr /><br />
+
+</script>
+
+<h1>$i18n.getString( "orgunitwise_progress_ra" )</h1>
+<hr /><br />
 	        
-		<form id="reportForm" name="reportForm" action="ouwisegenerateProgressReport.action" method="post" target="_blank">
-            <table align="center" style=" border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="730" border=0>		                
-				<tr>
-					<td class="NormalB">
-						Reports :<br />
-                    	<select id="reportList" name="reportList" style="width:200px">
-							#foreach($report in $reportList)
-								<option value="$report.id">$report.name</option>
-							#end
-                        </select>
-    			    </td>
-                    <td class="NormalB">
-						<label for="startDate">$i18n.getString( 'start_date' ) ($i18n.getString( "format.date.label" ))</label><br/>
-						<input type="text" id="startDate" name="startDate" onChange="if(!isDate( this.value )) this.value='';" style="width:20em" class="{validate:{required:true,dateISO:true}}">
-						
-					</td>
-                </tr>
-                <tr>
-                    <td>&nbsp;</td>
-                    <td>&nbsp;</td>
-                </tr>
-                <tr>
-                    <td>&nbsp;</td>
-                    <td>&nbsp;</td>
-                </tr>			
-                <tr>
-					<td class="NormalB">                          
-                    OrganisationUnit : <br />
-                    <input type="text" name="ouNameTB" id="ouNameTB" size="20" disabled>         
-                    </td>
-          	        <td class="NormalB">
-						<label for="endDate">$i18n.getString( 'end_date' ) ($i18n.getString( "format.date.label" ))</label><br />
-						<input type="text" id="endDate" name="endDate" onChange="if(!isDate( this.value )) this.value='';"  style="width:20em" class="{validate:{required:true,dateISO:true}}">
-						
-					</td>
-                </tr>
-			<tr>
-                <td>
-                    <select id="periodTypeId" name="periodTypeId" style="display:none">
-                        <option value="$periodTypeName">$periodTypeName</option>
-                    </select>
-                </td>
-                <td>&nbsp;</td>
-            </tr>
-            <tr>
-                <td>&nbsp;</td>
-                <td>&nbsp;</td>
-            </tr>
-   	            <tr>
-                <td>&nbsp;</td>
-                <td>
-                        <input type="submit" name="generate" value='Generate Report'/>
-                        <input type="hidden" name="ouIDTB" id="ouIDTB">
-                        <input type="hidden" name="ouLevelTB" id="ouLevelTB">
-                        <input type="hidden" name="autogen" id="autogen" value="0" >
-                        <input type="hidden"  name="periodTypeId" id="periodTypeId" value="$periodTypeName"  >
-                   <!-- <input type="hidden" name="reportModelTB" id="reportModelTB">
-                        <input type="hidden" name="reportFileNameTB" id="reportFileNameTB">-->
-                        <input type="hidden" name="reportTypeNameTB" id="reportTypeNameTB" value="$reportTypeName">
-                    </td>
-                </tr>
-            </table>
-		</form>
+<form id="reportForm" name="reportForm" action="ouwisegenerateProgressReport.action" method="post" target="_blank">
+	<table align="center" style=" border-collapse: collapse; margin-top: 0;" cellpadding="0" cellspacing="0" width="730" border=0>		                
+		<tr>
+            <td class="NormalB">                          
+                1. $i18n.getString( "organisationunit" ) :<br />
+                <input type="text" name="ouNameTB" id="ouNameTB" size="20" style="width:200px" disabled />         
+            </td>
+			<td class="NormalB">
+				<label for="startDate">3. $i18n.getString( 'start_date' ) ($i18n.getString( "format.date.label" ))</label><br/>
+				<input type="text" id="startDate" name="startDate" onChange="if(!isDate( this.value )) this.value='';" style="width:180px" class="{validate:{required:true,dateISO:true}}">
+			</td>
+		</tr>
+		<tr>
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+		</tr>
+		<tr>
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+		</tr>			
+		<tr>
+            <td class="NormalB">
+                2. $i18n.getString( "reports" ) :<br />
+                <select id="reportList" name="reportList" style="width:200px">
+                #foreach($report in $reportList)
+                    <option value="$report.id">$report.name</option>
+                #end
+                </select>
+            </td>
+			<td class="NormalB">
+				<label for="endDate">4. $i18n.getString( 'end_date' ) ($i18n.getString( "format.date.label" ))</label><br />
+				<input type="text" id="endDate" name="endDate" onChange="if(!isDate( this.value )) this.value='';"  style="width:180px" class="{validate:{required:true,dateISO:true}}">
+			</td>
+		</tr>
+		<tr>
+			<td>
+				<select id="periodTypeId" name="periodTypeId" style="display:none">
+					<option value="$periodTypeName">$periodTypeName</option>
+				</select>
+			</td>
+			<td>&nbsp;</td>
+		</tr>
+		<tr>
+			<td>&nbsp;</td>
+			<td>&nbsp;</td>
+		</tr>
+        <tr>
+            <td>&nbsp;</td>
+            <td>&nbsp;</td>
+        </tr>
+		<tr>
+			<td>&nbsp;</td>
+			<td>
+				<input type="submit" name="generate" style="width:200px" value="$i18n.getString( 'generate_report' )"/>
+				<input type="hidden" name="ouIDTB" id="ouIDTB">
+				<input type="hidden" name="autogen" id="autogen" value="0" >
+				<input type="hidden" name="reportTypeNameTB" id="reportTypeNameTB" value="$reportTypeName">
+			</td>
+		</tr>
+	</table>
+</form>
 
 <script type="text/javascript">	
 	jQuery( function(){