← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4184: ReportGroup, ReportTableGroup - Applied GUI.

 

------------------------------------------------------------
revno: 4184
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-21 16:09:42 +0700
message:
  ReportGroup, ReportTableGroup - Applied GUI.
added:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/comparator/ReportGroupNameComparator.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/comparator/ReportTableGroupNameComparator.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/AddReportGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupListAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/RemoveReportGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ShowUpdateReportGroupFormAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/UpdateReportGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ValidateReportGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/AddReportTableGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupListAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/RemoveReportTableGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ShowUpdateReportTableGroupFormAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/UpdateReportTableGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ValidateReportTableGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportGroupForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportTableGroupForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportGroupForm.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportTableGroupForm.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportGroup.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportTableGroup.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportGroupForm.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportTableGroupForm.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReportTables.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReports.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportGroup.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGroup.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportGroup.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableGroup.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportGroupForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportTableGroupForm.vm
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/GetChartGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/RemoveChartGroupAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateChartGroupForm.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
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/comparator/ReportGroupNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/comparator/ReportGroupNameComparator.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/comparator/ReportGroupNameComparator.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,45 @@
+package org.hisp.dhis.report.comparator;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.Comparator;
+
+import org.hisp.dhis.report.ReportGroup;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class ReportGroupNameComparator
+    implements Comparator<ReportGroup>
+{
+    public int compare( ReportGroup group1, ReportGroup group2 )
+    {
+        return group1.getName().compareToIgnoreCase( group2.getName() );
+    }
+}

=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/comparator/ReportTableGroupNameComparator.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/comparator/ReportTableGroupNameComparator.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/comparator/ReportTableGroupNameComparator.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,45 @@
+package org.hisp.dhis.reporttable.comparator;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.Comparator;
+
+import org.hisp.dhis.reporttable.ReportTableGroup;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class ReportTableGroupNameComparator
+    implements Comparator<ReportTableGroup>
+{
+    public int compare( ReportTableGroup group1, ReportTableGroup group2 )
+    {
+        return group1.getName().compareToIgnoreCase( group2.getName() );
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java	2011-05-06 11:10:34 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/GetAllChartsAction.java	2011-07-21 09:09:42 +0000
@@ -1,7 +1,7 @@
 package org.hisp.dhis.reporting.chart.action;
 
 /*
- * Copyright (c) 2004-2010, University of Oslo
+ * Copyright (c) 2004-2011, University of Oslo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/GetChartGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/GetChartGroupAction.java	2011-07-21 06:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/GetChartGroupAction.java	2011-07-21 09:09:42 +0000
@@ -68,13 +68,6 @@
         return chartGroup;
     }
 
-//    private int memberCount;
-//
-//    public int getMemberCount()
-//    {
-//        return memberCount;
-//    }
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
@@ -83,8 +76,6 @@
     {
         chartGroup = chartService.getChartGroup( id );
 
-        //memberCount = chartGroup.getMembers().size();
-
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/RemoveChartGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/RemoveChartGroupAction.java	2011-07-21 06:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chartgroup/action/RemoveChartGroupAction.java	2011-07-21 09:09:42 +0000
@@ -93,7 +93,6 @@
         try
         {
             chartService.deleteChartGroup( chartService.getChartGroup( id ) );
-
         }
         catch ( DeleteNotAllowedException ex )
         {

=== added directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup'
=== added directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action'
=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/AddReportGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/AddReportGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/AddReportGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,98 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class AddReportGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    private Set<String> groupMembers = new HashSet<String>();
+
+    public void setGroupMembers( Set<String> groupMembers )
+    {
+        this.groupMembers = groupMembers;
+    }
+    
+    private ReportGroup reportGroup;
+    
+    public ReportGroup getReportGroup()
+    {
+        return reportGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+   
+    public String execute()
+    {
+        reportGroup = new ReportGroup( name );
+        
+        for ( String id : groupMembers )
+        {
+            reportGroup.addReport( reportService.getReport( Integer.parseInt( id ) ) );
+        }
+
+        reportService.addReportGroup( reportGroup );        
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,81 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class GetReportGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input/output
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private ReportGroup reportGroup;
+
+    public ReportGroup getReportGroup()
+    {
+        return reportGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportGroup = reportService.getReportGroup( id );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupListAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/GetReportGroupListAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,110 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+import org.hisp.dhis.report.comparator.ReportGroupNameComparator;
+import org.hisp.dhis.paging.ActionPagingSupport;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class GetReportGroupListAction
+    extends ActionPagingSupport<ReportGroup>
+{
+    /**
+     * Determines if a de-serialized file is compatible with this class.
+     */
+    private static final long serialVersionUID = -1L;
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private List<ReportGroup> reportGroups;
+
+    public List<ReportGroup> getReportGroups()
+    {
+        return reportGroups;
+    }
+    
+    private String key;
+    
+    public String getKey()
+    {
+        return key;
+    }
+
+    public void setKey( String key )
+    {
+        this.key = key;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        if ( isNotBlank( key ) ) // Filter on key only if set
+        {
+            this.paging = createPaging( reportService.getReportGroupCountByName( key ) );
+            
+            reportGroups = new ArrayList<ReportGroup>( reportService.getReportGroupsBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+        }
+        else
+        {
+            this.paging = createPaging( reportService.getReportGroupCount() );
+            
+            reportGroups = new ArrayList<ReportGroup>( reportService.getReportGroupsBetween( paging.getStartPos(), paging.getPageSize() ) );
+        }
+
+        Collections.sort( reportGroups, new ReportGroupNameComparator() );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/RemoveReportGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/RemoveReportGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/RemoveReportGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,111 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.common.DeleteNotAllowedException;
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class RemoveReportGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+
+    // -------------------------------------------------------------------------
+    // I18n
+    // -------------------------------------------------------------------------
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        try
+        {
+            reportService.deleteReportGroup( reportService.getReportGroup( id ) );
+        }
+        catch ( DeleteNotAllowedException ex )
+        {
+            if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
+            {
+                message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+
+                return ERROR;
+            }
+        }
+
+        message = i18n.getString( "item_deleted_successfully" );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ShowUpdateReportGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ShowUpdateReportGroupFormAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ShowUpdateReportGroupFormAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.reporting.reportgroup.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class ShowUpdateReportGroupFormAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Comparator
+    // -------------------------------------------------------------------------
+
+    private Comparator<Report> reportComparator;
+
+    public void setReportComparator( Comparator<Report> reportComparator )
+    {
+        this.reportComparator = reportComparator;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input/output
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private ReportGroup reportGroup;
+
+    public ReportGroup getReportGroup()
+    {
+        return reportGroup;
+    }
+
+    private List<Report> groupMembers = new ArrayList<Report>();
+
+    public List<Report> getGroupMembers()
+    {
+        return groupMembers;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportGroup = reportService.getReportGroup( id );
+
+        groupMembers = new ArrayList<Report>( reportGroup.getMembers() );
+
+        Collections.sort( groupMembers, reportComparator );
+
+        return SUCCESS;
+    }
+}
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/UpdateReportGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/UpdateReportGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/UpdateReportGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,116 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hisp.dhis.report.Report;
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class UpdateReportGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    private Set<String> groupMembers = new HashSet<String>();
+
+    public void setGroupMembers( Set<String> groupMembers )
+    {
+        this.groupMembers = groupMembers;
+    }
+
+    private ReportGroup reportGroup;
+
+    public ReportGroup getReportGroup()
+    {
+        return reportGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportGroup = reportService.getReportGroup( id );
+
+        if ( name != null && name.trim().length() > 0 )
+        {
+            reportGroup.setName( name );
+        }
+
+        Set<Report> members = new HashSet<Report>();
+
+        for ( String memberId : groupMembers )
+        {
+            members.add( reportService.getReport( Integer.parseInt( memberId ) ) );
+        }
+
+        reportGroup.updateReports( members );
+
+        reportService.updateReportGroup( reportGroup );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ValidateReportGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ValidateReportGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportgroup/action/ValidateReportGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,113 @@
+package org.hisp.dhis.reporting.reportgroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.report.ReportGroup;
+import org.hisp.dhis.report.ReportService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class ValidateReportGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportService reportService;
+
+    public void setReportService( ReportService reportService )
+    {
+        this.reportService = reportService;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        if ( name != null )
+        {
+            ReportGroup match = reportService.getReportGroupByName( name );
+
+            if ( match != null && (id == null || match.getId() != id) )
+            {
+                message = i18n.getString( "name_in_use" );
+
+                return ERROR;
+            }
+        }
+
+        message = i18n.getString( "everything_is_ok" );
+
+        return SUCCESS;
+    }
+}

=== added directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup'
=== added directory 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action'
=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/AddReportTableGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/AddReportTableGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/AddReportTableGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,98 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class AddReportTableGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    private Set<String> groupMembers = new HashSet<String>();
+
+    public void setGroupMembers( Set<String> groupMembers )
+    {
+        this.groupMembers = groupMembers;
+    }
+    
+    private ReportTableGroup reportTableGroup;
+    
+    public ReportTableGroup getReportTableGroup()
+    {
+        return reportTableGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+   
+    public String execute()
+    {
+        reportTableGroup = new ReportTableGroup( name );
+        
+        for ( String id : groupMembers )
+        {
+            reportTableGroup.addReportTable( reportTableService.getReportTable( Integer.parseInt( id ) ) );
+        }
+
+        reportTableService.addReportTableGroup( reportTableGroup );        
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,81 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class GetReportTableGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input/output
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private ReportTableGroup reportTableGroup;
+
+    public ReportTableGroup getReportTableGroup()
+    {
+        return reportTableGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportTableGroup = reportTableService.getReportTableGroup( id );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupListAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupListAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/GetReportTableGroupListAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,110 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import static org.apache.commons.lang.StringUtils.isNotBlank;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.hisp.dhis.paging.ActionPagingSupport;
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+import org.hisp.dhis.reporttable.comparator.ReportTableGroupNameComparator;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class GetReportTableGroupListAction
+    extends ActionPagingSupport<ReportTableGroup>
+{
+    /**
+     * Determines if a de-serialized file is compatible with this class.
+     */
+    private static final long serialVersionUID = -1L;
+
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+    
+    // -------------------------------------------------------------------------
+    // Input & Output
+    // -------------------------------------------------------------------------
+
+    private List<ReportTableGroup> reportTableGroups;
+
+    public List<ReportTableGroup> getReportTableGroups()
+    {
+        return reportTableGroups;
+    }
+    
+    private String key;
+    
+    public String getKey()
+    {
+        return key;
+    }
+
+    public void setKey( String key )
+    {
+        this.key = key;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        if ( isNotBlank( key ) ) // Filter on key only if set
+        {
+            this.paging = createPaging( reportTableService.getReportTableGroupCountByName( key ) );
+            
+            reportTableGroups = new ArrayList<ReportTableGroup>( reportTableService.getReportTableGroupsBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+        }
+        else
+        {
+            this.paging = createPaging( reportTableService.getReportTableGroupCount() );
+            
+            reportTableGroups = new ArrayList<ReportTableGroup>( reportTableService.getReportTableGroupsBetween( paging.getStartPos(), paging.getPageSize() ) );
+        }
+
+        Collections.sort( reportTableGroups, new ReportTableGroupNameComparator() );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/RemoveReportTableGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/RemoveReportTableGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/RemoveReportTableGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,111 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.common.DeleteNotAllowedException;
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+public class RemoveReportTableGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+
+    // -------------------------------------------------------------------------
+    // I18n
+    // -------------------------------------------------------------------------
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        try
+        {
+            reportTableService.deleteReportTableGroup( reportTableService.getReportTableGroup( id ) );
+        }
+        catch ( DeleteNotAllowedException ex )
+        {
+            if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
+            {
+                message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
+
+                return ERROR;
+            }
+        }
+
+        message = i18n.getString( "item_deleted_successfully" );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ShowUpdateReportTableGroupFormAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ShowUpdateReportTableGroupFormAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ShowUpdateReportTableGroupFormAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class ShowUpdateReportTableGroupFormAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Comparator
+    // -------------------------------------------------------------------------
+
+    private Comparator<ReportTable> reportTableComparator;
+
+    public void setReportTableComparator( Comparator<ReportTable> reportTableComparator )
+    {
+        this.reportTableComparator = reportTableComparator;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input/output
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private ReportTableGroup reportTableGroup;
+
+    public ReportTableGroup getReportTableGroup()
+    {
+        return reportTableGroup;
+    }
+
+    private List<ReportTable> groupMembers = new ArrayList<ReportTable>();
+
+    public List<ReportTable> getGroupMembers()
+    {
+        return groupMembers;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportTableGroup = reportTableService.getReportTableGroup( id );
+
+        groupMembers = new ArrayList<ReportTable>( reportTableGroup.getMembers() );
+
+        Collections.sort( groupMembers, reportTableComparator );
+
+        return SUCCESS;
+    }
+}
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/UpdateReportTableGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/UpdateReportTableGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/UpdateReportTableGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,116 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hisp.dhis.reporttable.ReportTable;
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class UpdateReportTableGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    private Set<String> groupMembers = new HashSet<String>();
+
+    public void setGroupMembers( Set<String> groupMembers )
+    {
+        this.groupMembers = groupMembers;
+    }
+
+    private ReportTableGroup reportTableGroup;
+
+    public ReportTableGroup getReportTableGroup()
+    {
+        return reportTableGroup;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        reportTableGroup = reportTableService.getReportTableGroup( id );
+
+        if ( name != null && name.trim().length() > 0 )
+        {
+            reportTableGroup.setName( name );
+        }
+
+        Set<ReportTable> members = new HashSet<ReportTable>();
+
+        for ( String memberId : groupMembers )
+        {
+            members.add( reportTableService.getReportTable( Integer.parseInt( memberId ) ) );
+        }
+
+        reportTableGroup.updateReportTables( members );
+
+        reportTableService.updateReportTableGroup( reportTableGroup );
+
+        return SUCCESS;
+    }
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ValidateReportTableGroupAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ValidateReportTableGroupAction.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reporttablegroup/action/ValidateReportTableGroupAction.java	2011-07-21 09:09:42 +0000
@@ -0,0 +1,113 @@
+package org.hisp.dhis.reporting.reporttablegroup.action;
+
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import org.hisp.dhis.i18n.I18n;
+import org.hisp.dhis.reporttable.ReportTableGroup;
+import org.hisp.dhis.reporttable.ReportTableService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author Dang Duy Hieu
+ * @version $Id$
+ */
+
+public class ValidateReportTableGroupAction
+    implements Action
+{
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+
+    private ReportTableService reportTableService;
+
+    public void setReportTableService( ReportTableService reportTableService )
+    {
+        this.reportTableService = reportTableService;
+    }
+
+    private I18n i18n;
+
+    public void setI18n( I18n i18n )
+    {
+        this.i18n = i18n;
+    }
+
+    // -------------------------------------------------------------------------
+    // Input
+    // -------------------------------------------------------------------------
+
+    private Integer id;
+
+    public void setId( Integer id )
+    {
+        this.id = id;
+    }
+
+    private String name;
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    // -------------------------------------------------------------------------
+    // Output
+    // -------------------------------------------------------------------------
+
+    private String message;
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    // -------------------------------------------------------------------------
+    // Action implementation
+    // -------------------------------------------------------------------------
+
+    public String execute()
+    {
+        if ( name != null )
+        {
+            ReportTableGroup match = reportTableService.getReportTableGroupByName( name );
+
+            if ( match != null && (id == null || match.getId() != id) )
+            {
+                message = i18n.getString( "name_in_use" );
+
+                return ERROR;
+            }
+        }
+
+        message = i18n.getString( "everything_is_ok" );
+
+        return SUCCESS;
+    }
+}

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2011-07-21 06:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2011-07-21 09:09:42 +0000
@@ -210,7 +210,44 @@
     <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
   </bean>
+  
+  <!-- ReportTableGroups -->
+
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupAction" class="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupListAction" class="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupListAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.ValidateReportTableGroupAction" class="org.hisp.dhis.reporting.reporttablegroup.action.ValidateReportTableGroupAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.AddReportTableGroupAction" class="org.hisp.dhis.reporting.reporttablegroup.action.AddReportTableGroupAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.ShowUpdateReportTableGroupFormAction" class="org.hisp.dhis.reporting.reporttablegroup.action.ShowUpdateReportTableGroupFormAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.UpdateReportTableGroupAction" class="org.hisp.dhis.reporting.reporttablegroup.action.UpdateReportTableGroupAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
     
+  <bean id="org.hisp.dhis.reporting.reporttablegroup.action.RemoveReportTableGroupAction" class="org.hisp.dhis.reporting.reporttablegroup.action.RemoveReportTableGroupAction"
+    scope="prototype">
+    <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
+  </bean>
+  
   <!-- ReportViewer -->
 
   <bean id="org.hisp.dhis.reporting.reportviewer.action.AddReportAction" class="org.hisp.dhis.reporting.reportviewer.action.AddReportAction"
@@ -260,6 +297,43 @@
     <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
   </bean>
   
+  <!-- ReportGroups -->
+
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupAction" class="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupListAction" class="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupListAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.ValidateReportGroupAction" class="org.hisp.dhis.reporting.reportgroup.action.ValidateReportGroupAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.AddReportGroupAction" class="org.hisp.dhis.reporting.reportgroup.action.AddReportGroupAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.ShowUpdateReportGroupFormAction" class="org.hisp.dhis.reporting.reportgroup.action.ShowUpdateReportGroupFormAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+  
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.UpdateReportGroupAction" class="org.hisp.dhis.reporting.reportgroup.action.UpdateReportGroupAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+    
+  <bean id="org.hisp.dhis.reporting.reportgroup.action.RemoveReportGroupAction" class="org.hisp.dhis.reporting.reportgroup.action.RemoveReportGroupAction"
+    scope="prototype">
+    <property name="reportService" ref="org.hisp.dhis.report.ReportService" />
+  </bean>
+  
   <!-- PivotTable -->
 
   <bean id="org.hisp.dhis.reporting.pivottable.action.GetPivotTableOptionsAction" class="org.hisp.dhis.reporting.pivottable.action.GetPivotTableOptionsAction"

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2011-07-21 06:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2011-07-21 09:09:42 +0000
@@ -108,7 +108,7 @@
       <param name="onExceptionReturn">plainTextError</param>
     </action>
     
-	<!-- ReportGroup -->
+	<!-- ChartGroup -->
 	
     <action name="chartGroup" class="org.hisp.dhis.reporting.chartgroup.action.GetChartGroupListAction">
       <result name="success" type="velocity">/main.vm</result>
@@ -147,8 +147,7 @@
     </action>
 
     <action name="updateChartGroup" class="org.hisp.dhis.reporting.chartgroup.action.UpdateChartGroupAction">
-      <result name="success" type="redirect">chartGroup.action
-			</result>
+      <result name="success" type="redirect">chartGroup.action</result>
       <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
     </action>
 	
@@ -200,7 +199,12 @@
       <param name="javascripts">javascript/report.js</param>
       <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
     </action>
-
+	
+    <action name="getReports" class="org.hisp.dhis.reporting.reportviewer.action.GetAllReportsAction">
+      <result name="success" type="velocity-json">/dhis-web-reporting/jsonReports.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+	
     <action name="addReportToDashboard" class="org.hisp.dhis.reporting.reportviewer.action.AddReportToDashboardAction">
       <result name="success" type="velocity-xml">/dhis-web-reporting/responseSuccess.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
@@ -214,6 +218,62 @@
       <result name="success" type="outputStreamResult" />
     </action>
 	
+	<!-- ReportGroup -->
+	
+    <action name="reportGroup" class="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupListAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/reportGroup.vm</param>
+      <param name="menu">/dhis-web-reporting/menu.vm</param>
+      <param name="javascripts">javascript/reportGroup.js</param>
+      <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
+    </action>
+
+    <action name="removeReportGroup" class="org.hisp.dhis.reporting.reportgroup.action.RemoveReportGroupAction">
+      <result name="success" type="velocity-json">
+        /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+      <result name="error" type="velocity-json">
+        /dhis-web-commons/ajax/jsonResponseError.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_DELETE</param>
+    </action>
+
+    <action name="showAddReportGroupForm" class="org.hisp.dhis.reporting.report.action.GetAllReportsAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/addReportGroupForm.vm</param>
+      <param name="javascripts">javascript/reportGroup.js</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_ADD</param>
+    </action>
+
+    <action name="addReportGroup" class="org.hisp.dhis.reporting.reportgroup.action.AddReportGroupAction">
+      <result name="success" type="redirect">reportGroup.action</result>
+      <param name="requiredAuthorities">F_INDICATORGROUP_ADD</param>
+    </action>
+
+    <action name="showUpdateReportGroupForm" class="org.hisp.dhis.reporting.reportgroup.action.ShowUpdateReportGroupFormAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/updateReportGroupForm.vm</param>
+      <param name="javascripts">javascript/reportGroup.js</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
+    </action>
+
+    <action name="updateReportGroup" class="org.hisp.dhis.reporting.reportgroup.action.UpdateReportGroupAction">
+      <result name="success" type="redirect">reportGroup.action</result>
+      <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
+    </action>
+	
+	<action name="getReportGroup" class="org.hisp.dhis.reporting.reportgroup.action.GetReportGroupAction">
+      <result name="success" type="velocity-xml">/dhis-web-reporting/responseReportGroup.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+
+    <action name="validateReportGroup" class="org.hisp.dhis.reporting.reportgroup.action.ValidateReportGroupAction">
+      <result name="success" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+      <result name="error" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseError.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+	
     <!-- ReportTable -->
 
     <action name="displayManageTableForm" class="org.hisp.dhis.reporting.tablecreator.action.GetAllTablesAction">
@@ -223,7 +283,12 @@
       <param name="javascripts">javascript/table.js</param>
       <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
     </action>
-
+	
+    <action name="getReportTables" class="org.hisp.dhis.reporting.tablecreator.action.GetAllTablesAction">
+      <result name="success" type="velocity-json">/dhis-web-reporting/jsonReportTables.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+	
     <action name="removeTable" class="org.hisp.dhis.reporting.tablecreator.action.RemoveTableAction">
       <result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
       <param name="requiredAuthorities">F_REPORTTABLE_DELETE</param>
@@ -293,6 +358,63 @@
       <param name="onExceptionReturn">plainTextError</param>
     </action>
     
+	<!-- ReportTableGroup -->
+	
+    <action name="reportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupListAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/reportTableGroup.vm</param>
+      <param name="menu">/dhis-web-reporting/menu.vm</param>
+      <param name="javascripts">javascript/reportTableGroup.js</param>
+      <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
+    </action>
+
+    <action name="removeReportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.RemoveReportTableGroupAction">
+      <result name="success" type="velocity-json">
+        /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+      <result name="error" type="velocity-json">
+        /dhis-web-commons/ajax/jsonResponseError.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_DELETE</param>
+    </action>
+
+    <action name="showAddReportTableGroupForm" class="org.hisp.dhis.reporting.reporttable.action.GetAllReportTablesAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/addReportTableGroupForm.vm</param>
+      <param name="javascripts">javascript/reportTableGroup.js</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_ADD</param>
+    </action>
+
+    <action name="addReportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.AddReportTableGroupAction">
+      <result name="success" type="redirect">reportTableGroup.action</result>
+      <param name="requiredAuthorities">F_INDICATORGROUP_ADD</param>
+    </action>
+
+    <action name="showUpdateReportTableGroupForm" class="org.hisp.dhis.reporting.reporttablegroup.action.ShowUpdateReportTableGroupFormAction">
+      <result name="success" type="velocity">/main.vm</result>
+      <param name="page">/dhis-web-reporting/updateReportTableGroupForm.vm</param>
+      <param name="javascripts">javascript/reportTableGroup.js</param>
+      <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
+    </action>
+
+    <action name="updateReportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.UpdateReportTableGroupAction">
+      <result name="success" type="redirect">reportTableGroup.action
+			</result>
+      <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
+    </action>
+	
+	<action name="getReportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.GetReportTableGroupAction">
+      <result name="success" type="velocity-xml">/dhis-web-reporting/responseReportTableGroup.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+
+    <action name="validateReportTableGroup" class="org.hisp.dhis.reporting.reporttablegroup.action.ValidateReportTableGroupAction">
+      <result name="success" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+      <result name="error" type="velocity-json">
+		/dhis-web-commons/ajax/jsonResponseError.vm</result>
+      <param name="onExceptionReturn">plainTextError</param>
+    </action>
+	
     <!-- PivotTable -->
 
     <action name="displayPivotTableForm" class="org.hisp.dhis.reporting.pivottable.action.GetPivotTableOptionsAction">

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportGroupForm.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportGroupForm.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,72 @@
+<script type="text/javascript" src="javascript/addReportGroupForm.js"></script>
+<script type="text/javascript">
+	jQuery(function() {
+		jQuery("#availableReportsList").dhisAjaxSelect({
+			source: "getReports.action",
+			iterator: "reports",
+			connectedTo: 'groupMembers',
+			handler: function(item) {
+				var option = jQuery("<option />");
+				option.text( item.name );
+				option.attr( "value", item.id );
+
+				return option;
+			}
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "create_new_report_group" )</h3>
+
+<form id="addReportGroupForm" action="addReportGroup.action" method="post" >
+
+<table>
+	<tr>
+		<th colspan="2">$i18n.getString( "details" )</th>
+	</tr>
+	<tr>
+		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="name" name="name" style="width:20em"/></td>
+	</tr>
+	<tr>
+		<td colspan="2" height="15px"></td>
+	</tr>
+</table>
+
+<table>
+    <col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+
+	<tr>
+		<th>$i18n.getString( "available_reports" )</th>
+		<th></th>
+		<th>$i18n.getString( "group_members" )
+			<select id="memberValidator" class="{validate:{required:true}}" style="display:none"/>
+		</th>
+	</tr>
+
+	<tr>
+		<td>
+			<select id="availableReportsList" multiple="multiple" style="height: 200px; width: 100%;"></select>
+		</td>
+		
+        <td style="text-align:center">          
+        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableReportsList' );"/><br/>
+            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembers' );"/><br/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableReportsList' );"/><br/>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembers' );"/>
+        </td>
+    
+		<td>
+			<select id="groupMembers" name="groupMembers" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;"></select>
+		</td>
+	</tr>
+</table>
+
+<p>
+	<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+	<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='reportGroup.action'" style="width:10em"/>
+</p>
+
+</form>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportTableGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportTableGroupForm.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportTableGroupForm.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,72 @@
+<script type="text/javascript" src="javascript/addReportTableGroupForm.js"></script>
+<script type="text/javascript">
+	jQuery(function() {
+		jQuery("#availableReportTablesList").dhisAjaxSelect({
+			source: "getReportTables.action",
+			iterator: "reportTables",
+			connectedTo: 'groupMembers',
+			handler: function(item) {
+				var option = jQuery("<option />");
+				option.text( item.name );
+				option.attr( "value", item.id );
+
+				return option;
+			}
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "create_new_reporttable_group" )</h3>
+
+<form id="addReportTableGroupForm" action="addReportTableGroup.action" method="post" >
+
+<table>
+	<tr>
+		<th colspan="2">$i18n.getString( "details" )</th>
+	</tr>
+	<tr>
+		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="name" name="name" style="width:20em"/></td>
+	</tr>
+	<tr>
+		<td colspan="2" height="15px"></td>
+	</tr>
+</table>
+
+<table>
+    <col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+
+	<tr>
+		<th>$i18n.getString( "available_reporttables" )</th>
+		<th></th>
+		<th>$i18n.getString( "group_members" )
+			<select id="memberValidator" class="{validate:{required:true}}" style="display:none"/>
+		</th>
+	</tr>
+
+	<tr>
+		<td>
+			<select id="availableReportTablesList" multiple="multiple" style="height: 200px; width: 100%;"></select>
+		</td>
+		
+        <td style="text-align:center">          
+        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableReportTablesList' );"/><br/>
+            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembers' );"/><br/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableReportTablesList' );"/><br/>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembers' );"/>
+        </td>
+    
+		<td>
+			<select id="groupMembers" name="groupMembers" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;"></select>
+		</td>
+	</tr>
+</table>
+
+<p>
+	<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+	<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='reportTableGroup.action'" style="width:10em"/>
+</p>
+
+</form>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportGroupForm.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportGroupForm.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,19 @@
+jQuery( document ).ready( function()
+{
+    validation2( 'addReportGroupForm', function( form )
+    {
+        form.submit()
+    }, {
+        'beforeValidateHandler' : function()
+        {
+            listValidator( 'memberValidator', 'groupMembers' );
+        },
+        'rules' : getValidationRules( "reportGroup" )
+    } );
+
+    checkValueIsExist( "name", "validateReportGroup.action" );
+
+    var nameField = document.getElementById( 'name' );
+    nameField.select();
+    nameField.focus();
+} );

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportTableGroupForm.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportTableGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/addReportTableGroupForm.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,19 @@
+jQuery( document ).ready( function()
+{
+    validation2( 'addReportTableGroupForm', function( form )
+    {
+        form.submit()
+    }, {
+        'beforeValidateHandler' : function()
+        {
+            listValidator( 'memberValidator', 'groupMembers' );
+        },
+        'rules' : getValidationRules( "reportTableGroup" )
+    } );
+
+    checkValueIsExist( "name", "validateReportTableGroup.action" );
+
+    var nameField = document.getElementById( 'name' );
+    nameField.select();
+    nameField.focus();
+} );

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportGroup.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportGroup.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportGroup.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,24 @@
+function showReportGroupDetails( reportGroupId )
+{
+    var request = new Request();
+    request.setResponseTypeXML( 'reportGroup' );
+    request.setCallbackSuccess( reportGroupReceived );
+    request.send( 'getReportGroup.action?id=' + reportGroupId );
+}
+
+function reportGroupReceived( reportGroupElement )
+{
+    setInnerHTML( 'nameField', getElementValue( reportGroupElement, 'name' ) );
+    setInnerHTML( 'memberCountField', getElementValue( reportGroupElement, 'memberCount' ) );
+
+    showDetails();
+}
+
+// -----------------------------------------------------------------------------
+// Remove report group
+// -----------------------------------------------------------------------------
+
+function removeReportGroup( reportGroupId, reportGroupName )
+{
+    removeItem( reportGroupId, reportGroupName, i18n_confirm_delete, 'removeReportGroup.action' );
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportTableGroup.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportTableGroup.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/reportTableGroup.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,24 @@
+function showReportTableGroupDetails( reportTableGroupId )
+{
+    var request = new Request();
+    request.setResponseTypeXML( 'reportTableGroup' );
+    request.setCallbackSuccess( reportTableGroupReceived );
+    request.send( 'getReportTableGroup.action?id=' + reportTableGroupId );
+}
+
+function reportTableGroupReceived( reportTableGroupElement )
+{
+    setInnerHTML( 'nameField', getElementValue( reportTableGroupElement, 'name' ) );
+    setInnerHTML( 'memberCountField', getElementValue( reportTableGroupElement, 'memberCount' ) );
+
+    showDetails();
+}
+
+// -----------------------------------------------------------------------------
+// Remove report table group
+// -----------------------------------------------------------------------------
+
+function removeReportTableGroup( reportTableGroupId, reportTableGroupName )
+{
+    removeItem( reportTableGroupId, reportTableGroupName, i18n_confirm_delete, 'removeReportTableGroup.action' );
+}

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportGroupForm.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportGroupForm.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,16 @@
+jQuery( document ).ready( function()
+{
+    validation2( 'updateReportGroupForm', function( form )
+    {
+        form.submit()
+    }, {
+        'beforeValidateHandler' : function()
+        {
+            listValidator( 'memberValidator', 'groupMembers' );
+        },
+        'rules' : getValidationRules( "reportGroup" )
+    } );
+	
+	checkValueIsExist( "name", "validateReportGroup.action", {id: $reportGroup.id});
+	
+} );

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportTableGroupForm.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportTableGroupForm.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/updateReportTableGroupForm.js	2011-07-21 09:09:42 +0000
@@ -0,0 +1,16 @@
+jQuery( document ).ready( function()
+{
+    validation2( 'updateReportTableGroupForm', function( form )
+    {
+        form.submit()
+    }, {
+        'beforeValidateHandler' : function()
+        {
+            listValidator( 'memberValidator', 'groupMembers' );
+        },
+        'rules' : getValidationRules( "reportTableGroup" )
+    } );
+	
+	checkValueIsExist( "name", "validateReportTableGroup.action", {id: $reportTableGroup.id});
+	
+} );

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReportTables.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReportTables.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReportTables.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,13 @@
+#set( $size = $tables.size() )
+{ "reportTables": [
+#foreach( $reportTable in $tables )
+  {
+    "id": $!{reportTable.id},
+    "name": "$!encoder.jsonEncode( ${reportTable.name} )"
+  }#if( $velocityCount < $size ),#end
+#end
+]
+#if( $usePaging ),
+	"paging":#parse( "/dhis-web-commons/ajax/jsonPaging.vm" )
+#end
+}
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReports.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReports.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/jsonReports.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,13 @@
+#set( $size = $reports.size() )
+{ "reports": [
+#foreach( $report in $reports )
+  {
+    "id": $!{report.id},
+    "name": "$!encoder.jsonEncode( ${report.name} )"
+  }#if( $velocityCount < $size ),#end
+#end
+]
+#if( $usePaging ),
+	"paging":#parse( "/dhis-web-commons/ajax/jsonPaging.vm" )
+#end
+}
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportGroup.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportGroup.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportGroup.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,64 @@
+<script type="text/javascript">
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
+	
+	jQuery(document).ready(function() {
+		tableSorter( 'listTable' );
+	});
+</script>
+
+<h3>$i18n.getString( "report_group_management" ) #openHelp( "report_group" )</h3>
+
+<table class="mainPageTable">
+	<tr>
+		<td style="vertical-align:top">
+			<table width="100%">
+				<tr>
+					<td>#filterDiv( "reportGroup" )</td>
+					<td colspan="9" style="text-align:right">
+						<input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='showAddReportGroupForm.action'" style="width:80px"/></a>
+					</td>
+				</tr>
+			</table>
+			<table class="listTable" id="listTable">
+				<col/>          
+				<col width="100"/>
+				<thead>
+					<tr>
+						<th>$i18n.getString( "name" )</th>
+						<th style="text-align:center" class="{sorter: false}">$i18n.getString( "operations" )</th>
+					</tr>
+				</thead>
+				<tbody id="list">
+					#foreach( $reportGroup in $reportGroups )
+					<tr id="tr${reportGroup.id}">
+						<td onclick="showReportGroupDetails( $reportGroup.id )">$encoder.htmlEncode( $reportGroup.name )</td>
+						<td style="text-align:center">
+							<a href="showUpdateReportGroupForm.action?id=$reportGroup.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a>               
+							<a href="javascript:removeReportGroup( '$reportGroup.id', '$encoder.jsEncode( $reportGroup.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></a>               
+							<a href="javascript:showReportGroupDetails( $reportGroup.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"/></a>
+						</td>
+					</tr>
+				#end
+				</tbody>
+			</table>
+			<p></p>
+			#parse( "/dhis-web-commons/paging/paging.vm" )
+		</td>
+		<td style="width:20em; padding-left:2em; vertical-align:top">
+			<div id="detailsArea" style="display:none">
+				<div style="float:right">
+					<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"/></a>
+				</div>
+				<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
+				<p><label>$i18n.getString( "number_of_members" ):</label><br/><span id="memberCountField"></span></p>
+			</div>
+
+		<div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
+			<div style="float:right">
+				<a href="javascript:hideWarning()" title="$i18n.getString( 'hide_warning' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_warning' )"/></a>
+			</div>
+			<p><span id="warningField"></span></p>
+		</div>
+		</td>
+	</tr>
+</table>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGroup.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGroup.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/reportTableGroup.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,64 @@
+<script type="text/javascript">
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete" ) , "'" )';
+	
+	jQuery(document).ready(function() {
+		tableSorter( 'listTable' );
+	});
+</script>
+
+<h3>$i18n.getString( "reporttable_group_management" ) #openHelp( "reporttable_group" )</h3>
+
+<table class="mainPageTable">
+	<tr>
+		<td style="vertical-align:top">
+			<table width="100%">
+				<tr>
+					<td>#filterDiv( "reportTableGroup" )</td>
+					<td colspan="9" style="text-align:right">
+						<input type="button" value="$i18n.getString( 'add_new' )" onclick="window.location.href='showAddReportGroupForm.action'" style="width:80px"/></a>
+					</td>
+				</tr>
+			</table>
+			<table class="listTable" id="listTable">
+				<col/>          
+				<col width="100"/>
+				<thead>
+					<tr>
+						<th>$i18n.getString( "name" )</th>
+						<th style="text-align:center" class="{sorter: false}">$i18n.getString( "operations" )</th>
+					</tr>
+				</thead>
+				<tbody id="list">
+					#foreach( $reportTableGroup in $reportTableGroups )
+					<tr id="tr${reportTableGroup.id}">
+						<td onclick="showReportGroupDetails( $reportTableGroup.id )">$encoder.htmlEncode( $reportTableGroup.name )</td>
+						<td style="text-align:center">
+							<a href="showUpdateReportGroupForm.action?id=$reportTableGroup.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"/></a>               
+							<a href="javascript:removeReportGroup( '$reportTableGroup.id', '$encoder.jsEncode( $reportTableGroup.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"/></a>               
+							<a href="javascript:showReportGroupDetails( $reportTableGroup.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"/></a>
+						</td>
+					</tr>
+				#end
+				</tbody>
+			</table>
+			<p></p>
+			#parse( "/dhis-web-commons/paging/paging.vm" )
+		</td>
+		<td style="width:20em; padding-left:2em; vertical-align:top">
+			<div id="detailsArea" style="display:none">
+				<div style="float:right">
+					<a href="javascript:hideDetails()" title="$i18n.getString( 'hide_details' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_details' )"/></a>
+				</div>
+				<p><label>$i18n.getString( "name" ):</label><br/><span id="nameField"></span></p>
+				<p><label>$i18n.getString( "number_of_members" ):</label><br/><span id="memberCountField"></span></p>
+			</div>
+
+		<div id="warningArea" style="position:fixed;right:10px;top:200px;display:none">
+			<div style="float:right">
+				<a href="javascript:hideWarning()" title="$i18n.getString( 'hide_warning' )"><img src="../images/close.png" alt="$i18n.getString( 'hide_warning' )"/></a>
+			</div>
+			<p><span id="warningField"></span></p>
+		</div>
+		</td>
+	</tr>
+</table>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportGroup.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportGroup.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportGroup.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<reportGroup>
+	<id>$reportGroup.id</id>
+    <name>$!encoder.xmlEncode( $reportGroup.name )</name>
+    <memberCount>$reportGroup.getMembers().size()</memberCount>
+</reportGroup>
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableGroup.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableGroup.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableGroup.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<reportTableGroup>
+	<id>$reportTableGroup.id</id>
+    <name>$!encoder.xmlEncode( $reportTableGroup.name )</name>
+    <memberCount>$reportTableGroup.getMembers().size()</memberCount>
+</reportTableGroup>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateChartGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateChartGroupForm.vm	2011-07-21 06:51:02 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateChartGroupForm.vm	2011-07-21 09:09:42 +0000
@@ -65,7 +65,7 @@
 		<td>
 			<select id="groupMembers" name="groupMembers" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
 				#foreach( $chart in $groupMembers )
-                    <option value="$chart.id">$encoder.htmlEncode( $chart.name )</option>
+                    <option value="$chart.id">$encoder.htmlEncode( $chart.title )</option>
                 #end
 			</select>
 		</td>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportGroupForm.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportGroupForm.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,81 @@
+<script type="text/javascript" src="javascript/updateReportGroupForm.js"></script>
+<script type="text/javascript">
+	jQuery(document).ready(	function(){
+		jQuery("#availableReportsList").dhisAjaxSelect({
+			source: "getReports.action",
+			iterator: "reports",
+			connectedTo: 'groupMembers',
+			handler: function(item) {
+				var option = jQuery("<option />");
+				option.text( item.name );
+				option.attr( "value", item.id );
+
+				return option;
+			}
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "edit_report_group" )</h3>
+
+<form id="updateReportGroupForm" action="updateReportGroup.action" method="post" >
+
+<div>
+	<input type="hidden" id="id" name="id" value="$reportGroup.id"/>
+</div>
+
+<table>
+	<tr>
+		<th colspan="2">$i18n.getString( "details" )</th>
+	</tr>
+	<tr>
+		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $reportGroup.name )" style="width:20em"/></td>
+	</tr>
+	<tr>
+		<td colspan="2" height="15px"></td>
+	</tr>
+</table>
+
+<table>
+    <col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+
+	<tr>
+		<th>$i18n.getString( "available_reports" )</th>
+		<th></th>
+		<th>$i18n.getString( "group_members" )
+			<select id="memberValidator" class="{validate:{required:true}}" style="display:none"/>
+		</th>
+	</tr>
+
+	<tr>
+		<td>
+			<select id="availableReportsList" multiple="multiple" style="height: 200px; width: 100%;"></select>
+		</td>
+		
+        <td style="text-align:center">          
+        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableReportsList' );"/><br/>
+            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembers' );"/><br/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableReportsList' );"/><br/>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembers' );"/>
+        </td>
+    
+		<td>
+			<select id="groupMembers" name="groupMembers" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
+				#foreach( $report in $groupMembers )
+                    <option value="$report.id">$encoder.htmlEncode( $report.name )</option>
+                #end
+			</select>
+		</td>
+		
+	</tr>
+</table>
+
+<p>
+	<input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/>
+	<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='reportGroup.action'" style="width:10em"/>
+</p>
+
+</form>

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportTableGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportTableGroupForm.vm	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/updateReportTableGroupForm.vm	2011-07-21 09:09:42 +0000
@@ -0,0 +1,81 @@
+<script type="text/javascript" src="javascript/updateReportTableGroupForm.js"></script>
+<script type="text/javascript">
+	jQuery(document).ready(	function(){
+		jQuery("#availableReportTablesList").dhisAjaxSelect({
+			source: "getReportTables.action",
+			iterator: "reportTables",
+			connectedTo: 'groupMembers',
+			handler: function(item) {
+				var option = jQuery("<option />");
+				option.text( item.name );
+				option.attr( "value", item.id );
+
+				return option;
+			}
+		});
+	});
+</script>
+
+<h3>$i18n.getString( "edit_reporttable_group" )</h3>
+
+<form id="updateReportTableGroupForm" action="updateReportTableGroup.action" method="post" >
+
+<div>
+	<input type="hidden" id="id" name="id" value="$reportTableGroup.id"/>
+</div>
+
+<table>
+	<tr>
+		<th colspan="2">$i18n.getString( "details" )</th>
+	</tr>
+	<tr>
+		<td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+		<td><input type="text" id="name" name="name" value="$encoder.htmlEncode( $reportTableGroup.name )" style="width:20em"/></td>
+	</tr>
+	<tr>
+		<td colspan="2" height="15px"></td>
+	</tr>
+</table>
+
+<table>
+    <col style="width: 450px"/>
+    <col/>
+    <col style="width: 450px"/>
+
+	<tr>
+		<th>$i18n.getString( "available_reporttables" )</th>
+		<th></th>
+		<th>$i18n.getString( "group_members" )
+			<select id="memberValidator" class="{validate:{required:true}}" style="display:none"/>
+		</th>
+	</tr>
+
+	<tr>
+		<td>
+			<select id="availableReportTablesList" multiple="multiple" style="height: 200px; width: 100%;"></select>
+		</td>
+		
+        <td style="text-align:center">          
+        	<input type="button" value="&gt;" title="$i18n.getString( 'move_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'availableReportTablesList' );"/><br/>
+            <input type="button" value="&lt;" title="$i18n.getString( 'remove_selected' )" style="width:50px" onclick="dhisAjaxSelect_moveAllSelected( 'groupMembers' );"/><br/>
+			<input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'availableReportTablesList' );"/><br/>
+			<input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="dhisAjaxSelect_moveAll( 'groupMembers' );"/>
+        </td>
+    
+		<td>
+			<select id="groupMembers" name="groupMembers" multiple="multiple" style="height: 200px; width: 100%; margin-top: 22px;">
+				#foreach( $reportTable in $groupMembers )
+                    <option value="$reportTable.id">$encoder.htmlEncode( $reportTable.name )</option>
+                #end
+			</select>
+		</td>
+		
+	</tr>
+</table>
+
+<p>
+	<input type="submit" value="$i18n.getString( 'save' )" style="width:10em"/>
+	<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='reportTableGroup.action'" style="width:10em"/>
+</p>
+
+</form>