← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10844: Report table, upgrading data element dimensional tables to new multidimensional solution

 

------------------------------------------------------------
revno: 10844
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-05-15 12:10:47 +0200
message:
  Report table, upgrading data element dimensional tables to new multidimensional solution
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java
  dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.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/webapp/dhis-web-reporting/viewTableForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2013-05-14 21:14:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java	2013-05-15 10:10:47 +0000
@@ -41,9 +41,9 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.hisp.dhis.common.BaseAnalyticalObject;
-import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.common.BaseNameableObject;
 import org.hisp.dhis.common.CombinationGenerator;
+import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.DxfNamespaces;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.ListMap;
@@ -234,11 +234,6 @@
     private List<String> filterDimensions = new ArrayList<String>();
     
     /**
-     * The DataElementCategoryCombo for the ReportTable.
-     */
-    private DataElementCategoryCombo categoryCombo;
-
-    /**
      * The ReportParams of the ReportTable.
      */
     private ReportParams reportParams;
@@ -422,7 +417,7 @@
     public ReportTable( String name, List<DataElement> dataElements, List<Indicator> indicators,
                         List<DataSet> dataSets, List<Period> periods, List<Period> relativePeriods, List<OrganisationUnit> organisationUnits,
                         List<OrganisationUnit> relativeUnits, List<OrganisationUnitGroup> organisationUnitGroups,
-                        DataElementCategoryCombo categoryCombo, boolean doIndicators,
+                        boolean doIndicators,
                         boolean doPeriods, boolean doUnits, RelativePeriods relatives, ReportParams reportParams,
                         I18nFormat i18nFormat, String reportingPeriodName )
     {
@@ -435,7 +430,6 @@
         this.organisationUnits = organisationUnits;
         this.relativeUnits = relativeUnits;
         this.organisationUnitGroups = organisationUnitGroups;
-        this.categoryCombo = categoryCombo;
         this.relatives = relatives;
         this.reportParams = reportParams;
         this.i18nFormat = i18nFormat;
@@ -489,7 +483,7 @@
 
         if ( isDimensional() )
         {
-            categoryOptionCombos = new ArrayList<DataElementCategoryOptionCombo>( categoryCombo.getOptionCombos() );
+            categoryOptionCombos = new ArrayList<DataElementCategoryOptionCombo>( getCategoryCombo().getOptionCombos() );
             verify( nonEmptyLists( categoryOptionCombos ) == 1, "Category option combos size must be larger than 0" );
         }
 
@@ -660,13 +654,23 @@
 
         return organisationUnitGroupMap;
     }
+    
+    public DataElementCategoryCombo getCategoryCombo()
+    {
+        if ( dataElements != null && !dataElements.isEmpty() )
+        {
+            return dataElements.get( 0 ).getCategoryCombo();
+        }
+        
+        return null;
+    }
 
     /**
      * Indicates whether this ReportTable is multi-dimensional.
      */
     public boolean isDimensional()
     {
-        return categoryCombo != null;
+        return dataElements != null && !dataElements.isEmpty() && columnDimensions.contains( DimensionalObject.CATEGORYOPTIONCOMBO_DIM_ID );
     }
 
     /**
@@ -684,7 +688,9 @@
      */
     public boolean doSubTotals()
     {
-        return doTotal() && categoryCombo.getCategories() != null && categoryCombo.getCategories().size() > 1;
+        DataElementCategoryCombo categoryCombo = getCategoryCombo();
+        
+        return doTotal() && categoryCombo != null && categoryCombo.getCategories() != null && categoryCombo.getCategories().size() > 1;
     }
 
     /**
@@ -1145,20 +1151,6 @@
     }
 
     @JsonProperty
-    @JsonSerialize( as = BaseIdentifiableObject.class )
-    @JsonView( {DetailedView.class, ExportView.class} )
-    @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
-    public DataElementCategoryCombo getCategoryCombo()
-    {
-        return categoryCombo;
-    }
-
-    public void setCategoryCombo( DataElementCategoryCombo categoryCombo )
-    {
-        this.categoryCombo = categoryCombo;
-    }
-
-    @JsonProperty
     @JsonView( {DetailedView.class, ExportView.class} )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
     public ReportParams getReportParams()
@@ -1459,7 +1451,6 @@
 
             regression = reportTable.isRegression();
             cumulative = reportTable.isCumulative();
-            categoryCombo = reportTable.getCategoryCombo() == null ? categoryCombo : reportTable.getCategoryCombo();
             relatives = reportTable.getRelatives() == null ? relatives : reportTable.getRelatives();
             reportParams = reportTable.getReportParams() == null ? reportParams : reportTable.getReportParams();
             sortOrder = reportTable.getSortOrder() == null ? sortOrder : reportTable.getSortOrder();

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-05-09 17:32:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2013-05-15 10:10:47 +0000
@@ -782,6 +782,7 @@
             executeSql( "alter table reporttable drop column doindicators" );
             executeSql( "alter table reporttable drop column doperiods" );
             executeSql( "alter table reporttable drop column dounits" );
+            executeSql( "alter table reporttable drop column categorycomboid" );
         }
         catch ( Exception ex )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2013-05-14 21:14:22 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml	2013-05-15 10:10:47 +0000
@@ -53,10 +53,6 @@
         foreign-key="fk_reporttable_datasets_datasetid" />
     </list>
 
-    <many-to-one name="categoryCombo" class="org.hisp.dhis.dataelement.DataElementCategoryCombo"
-      column="categorycomboid"
-      foreign-key="fk_reporttable_categorycombo" />
-
     <list name="organisationUnits" table="reporttable_organisationunits">
       <cache usage="read-write" />
       <key column="reporttableid" foreign-key="fk_reporttable_organisationunits_reporttableid" />

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java	2012-11-13 18:52:00 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableGridTest.java	2013-05-15 10:10:47 +0000
@@ -129,7 +129,6 @@
     private int dataElementIdB;
     
     private int categoryOptionComboIdA;
-    private int categoryOptionComboIdB;
     
     private int indicatorIdA;
     private int indicatorIdB;
@@ -214,7 +213,6 @@
         categoryOptionComboB.getCategoryOptions().iterator().next().setCategoryOptionCombos( getSet( categoryOptionComboB ) );
         
         categoryOptionComboIdA = categoryOptionComboA.getId();
-        categoryOptionComboIdB = categoryOptionComboB.getId();
 
         categoryOptionCombos.add( categoryOptionComboA );        
         categoryOptionCombos.add( categoryOptionComboB );
@@ -393,7 +391,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(),
-            groups, null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -417,7 +415,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(), 
-            groups, null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -443,7 +441,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(), 
-            groups, null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -467,7 +465,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(),
-            groups, null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -491,7 +489,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(), 
-            groups, null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -517,7 +515,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(), 
-            groups, null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            groups, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         reportTable.setParentOrganisationUnit( unitA );
         
@@ -536,99 +534,6 @@
         assertEquals( 28.0, grid.getRow( 1 ).get( 11 ) );
     }
 
-    @Test
-    public void testGetCategoryComboOrgUnitReportTableA()
-    {
-        BatchHandler<AggregatedDataValue> dataValueOrgUnitBatchHandler = batchHandlerFactory.createBatchHandler( AggregatedOrgUnitDataValueBatchHandler.class ).init();
-        
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdA, 8, 31 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdB, 8, 32 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdA, 8, 33 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdB, 8, 34 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdA, 8, 35 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdB, 8, 36 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdA, 8, 37 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdB, 8, 38 ) );
-        
-        dataValueOrgUnitBatchHandler.flush();
-        
-        ReportTable reportTable = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(),
-            groups, categoryComboA, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
-
-        reportTable.setParentOrganisationUnit( unitA );
-        
-        int id = reportTableService.saveReportTable( reportTable );
-
-        Grid grid = reportTableService.getReportTableGrid( id, i18nFormat, date, "0" );
-        
-        assertEquals( 21.0, grid.getRow( 0 ).get( 8 ) );
-        assertEquals( 31.0, grid.getRow( 0 ).get( 9 ) );
-        assertEquals( 23.0, grid.getRow( 0 ).get( 10 ) );
-        assertEquals( 33.0, grid.getRow( 0 ).get( 11 ) );
-        assertEquals( 25.0, grid.getRow( 0 ).get( 12 ) );
-        assertEquals( 35.0, grid.getRow( 0 ).get( 13 ) );
-        assertEquals( 27.0, grid.getRow( 0 ).get( 14 ) );
-        assertEquals( 37.0, grid.getRow( 0 ).get( 15 ) );
-        
-        assertEquals( 22.0, grid.getRow( 1 ).get( 8 ) );
-        assertEquals( 32.0, grid.getRow( 1 ).get( 9 ) );
-        assertEquals( 24.0, grid.getRow( 1 ).get( 10 ) );
-        assertEquals( 34.0, grid.getRow( 1 ).get( 11 ) );
-        assertEquals( 26.0, grid.getRow( 1 ).get( 12 ) );
-        assertEquals( 36.0, grid.getRow( 1 ).get( 13 ) );
-        assertEquals( 28.0, grid.getRow( 1 ).get( 14 ) );
-        assertEquals( 38.0, grid.getRow( 1 ).get( 15 ) );
-    }
-
-    @Test
-    public void testGetCategoryComboOrgUnitReportTableB()
-    {
-        BatchHandler<AggregatedDataValue> dataValueOrgUnitBatchHandler = batchHandlerFactory.createBatchHandler( AggregatedOrgUnitDataValueBatchHandler.class ).init();
-        
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdA, 8, 31 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdB, 8, 32 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdA, 8, 33 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdA, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdB, 8, 34 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdA, 8, 35 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdA, 8, unitIdA, groupIdB, 8, 36 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdA, 8, 37 ) );
-        dataValueOrgUnitBatchHandler.addObject( new AggregatedDataValue( dataElementIdB, categoryOptionComboIdB, periodIdB, 8, unitIdA, groupIdB, 8, 38 ) );
-        
-        dataValueOrgUnitBatchHandler.flush();
-        
-        ReportTable reportTable = new ReportTable( "Prescriptions",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), new ArrayList<OrganisationUnit>(),
-            groups, categoryComboA, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
-
-        
-        reportTable.setParentOrganisationUnit( unitA );
-        
-        int id = reportTableService.saveReportTable( reportTable );
-
-        Grid grid = reportTableService.getReportTableGrid( id, i18nFormat, date, "0" );
-
-        assertEquals( 21.0, grid.getRow( 0 ).get( 13 ) );
-        assertEquals( 31.0, grid.getRow( 0 ).get( 14 ) );
-        assertEquals( 22.0, grid.getRow( 0 ).get( 15 ) );
-        assertEquals( 32.0, grid.getRow( 0 ).get( 16 ) );
-        
-        assertEquals( 23.0, grid.getRow( 1 ).get( 13 ) );
-        assertEquals( 33.0, grid.getRow( 1 ).get( 14 ) );
-        assertEquals( 24.0, grid.getRow( 1 ).get( 15 ) );
-        assertEquals( 34.0, grid.getRow( 1 ).get( 16 ) );
-        
-        assertEquals( 25.0, grid.getRow( 2 ).get( 13 ) );
-        assertEquals( 35.0, grid.getRow( 2 ).get( 14 ) );
-        assertEquals( 26.0, grid.getRow( 2 ).get( 15 ) );
-        assertEquals( 36.0, grid.getRow( 2 ).get( 16 ) );
-        
-        assertEquals( 27.0, grid.getRow( 3 ).get( 13 ) );
-        assertEquals( 37.0, grid.getRow( 3 ).get( 14 ) );
-        assertEquals( 28.0, grid.getRow( 3 ).get( 15 ) );
-        assertEquals( 38.0, grid.getRow( 3 ).get( 16 ) );
-    }
-    
     // -------------------------------------------------------------------------
     // Org unit hierarchy
     // -------------------------------------------------------------------------
@@ -638,7 +543,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -660,7 +565,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -684,7 +589,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -706,7 +611,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -728,7 +633,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -752,7 +657,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -774,7 +679,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -796,7 +701,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -820,7 +725,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -837,6 +742,7 @@
         assertEquals( 18.0, grid.getRow( 1 ).get( 11 ) );
     }
 
+    /*
     @Test
     public void testGetCategoryComboReportTableA()
     {
@@ -1023,14 +929,14 @@
         assertEquals( 18.0, grid.getRow( 7 ).get( 18 ) );
         assertEquals( 18.0, grid.getRow( 7 ).get( 19 ) );
         assertEquals( 36.0, grid.getRow( 7 ).get( 20 ) );
-    }
+    }*/
     
     @Test
     public void testGetMultiReportTableA()
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             dataElements, indicators, dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -1068,7 +974,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, indicators, dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -1116,7 +1022,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, indicators, dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -1154,7 +1060,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -1175,7 +1081,7 @@
     {
         ReportTable reportTable = new ReportTable( "Prescriptions",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(),
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, false, new RelativePeriods(), null, i18nFormat, "january_2000" );
 
         int id = reportTableService.saveReportTable( reportTable );
 
@@ -1196,7 +1102,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
         reportTable.setTopLimit( 2 );
         
         int id = reportTableService.saveReportTable( reportTable );
@@ -1217,7 +1123,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
         reportTable.setSortOrder( ReportTable.DESC );
         
         int id = reportTableService.saveReportTable( reportTable );
@@ -1242,7 +1148,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, new RelativePeriods(), null, i18nFormat, "january_2000" );
         
         reportTable.setRegression( true );
         

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2013-04-15 17:06:42 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableStoreTest.java	2013-05-15 10:10:47 +0000
@@ -192,13 +192,13 @@
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relativesA, null, i18nFormat, "january_2000" );        
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relativesA, null, i18nFormat, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relativesB, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relativesB, null, i18nFormat, "january_2000" );
         ReportTable reportTableC = new ReportTable( "Assualt",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relativesC, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relativesC, null, i18nFormat, "january_2000" );
         
         int idA = reportTableStore.save( reportTableA );
         int idB = reportTableStore.save( reportTableB );
@@ -244,10 +244,10 @@
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relativesA, null, i18nFormat, "january_2000" );        
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relativesA, null, i18nFormat, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relativesB, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relativesB, null, i18nFormat, "january_2000" );
         
         int idA = reportTableStore.save( reportTableA );
         int idB = reportTableStore.save( reportTableB );
@@ -271,10 +271,10 @@
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relativesA, null, i18nFormat, "january_2000" );        
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relativesA, null, i18nFormat, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relativesB, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relativesB, null, i18nFormat, "january_2000" );
         
         reportTableStore.save( reportTableA );
         reportTableStore.save( reportTableB );
@@ -290,10 +290,10 @@
     {
         ReportTable reportTableA = new ReportTable( "Immunization",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relativesA, null, i18nFormat, "january_2000" );        
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relativesA, null, i18nFormat, "january_2000" );        
         ReportTable reportTableB = new ReportTable( "Prescriptions",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relativesB, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relativesB, null, i18nFormat, "january_2000" );
         
         reportTableStore.save( reportTableA );
         reportTableStore.save( reportTableB );

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2013-05-14 21:14:22 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/reporttable/ReportTableTest.java	2013-05-15 10:10:47 +0000
@@ -358,7 +358,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), relativeUnits, 
-            groups, null, true, true, false, relatives, null, i18nFormat, "january_2000" );
+            groups, true, true, false, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -416,7 +416,7 @@
     {        
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, new ArrayList<OrganisationUnit>(), relativeUnits, 
-            groups, null, true, false, true, relatives, null, i18nFormat, "january_2000" );
+            groups, true, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -472,7 +472,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -530,7 +530,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -588,7 +588,7 @@
     {        
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -644,7 +644,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -674,7 +674,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), indicators, new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, false, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, false, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -704,7 +704,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -746,7 +746,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -788,7 +788,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -824,186 +824,13 @@
         assertNotNull( rows );
         assertEquals( 4, rows.size() );
     }
-    
-    @Test
-    public void testCategoryComboReportTableA()
-    {
-        ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), categoryCombo, true, true, false, relatives, null, i18nFormat, "january_2000" );
-        
-        reportTable.init();
-        
-        List<String> indexColumns = reportTable.getIndexColumns();
-
-        assertNotNull( indexColumns );
-        assertEquals( 1, indexColumns.size() );
-        assertTrue( indexColumns.contains( ReportTable.ORGANISATIONUNIT_ID ) );
-        
-        List<String> indexNameColumns = reportTable.getIndexNameColumns();
-        
-        assertNotNull( indexNameColumns );
-        assertEquals( 1, indexNameColumns.size() );
-        assertTrue( indexNameColumns.contains( ReportTable.ORGANISATIONUNIT_NAME ) );
-
-        List<List<NameableObject>> columns = reportTable.getGridColumns();
-        
-        assertNotNull( columns );
-        assertEquals( 16, columns.size() );
-        
-        Iterator<List<NameableObject>> iterator = columns.iterator();
-        
-        assertEquals( getList( dataElementA, periodA, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, periodA, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementA, periodB, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, periodB, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementA, periodC, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, periodC, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementA, periodD, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, periodD, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, periodA, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, periodA, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, periodB, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, periodB, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, periodC, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, periodC, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, periodD, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, periodD, categoryOptionComboB ), iterator.next() );
-        
-        List<String> columnNames = getColumnNames( reportTable.getGridColumns() );
-        
-        assertNotNull( columnNames );
-        assertEquals( 16, columnNames.size() );
-        
-        List<List<NameableObject>> rows = reportTable.getGridRows();
-        
-        assertNotNull( rows );
-        assertEquals( 2, rows.size() );
-
-        iterator = rows.iterator();
-        
-        assertEquals( getList( unitA ), iterator.next() );
-        assertEquals( getList( unitB ), iterator.next() );
-    }
-    
-    @Test
-    public void testCategoryComboReportTableB()
-    {
-        ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), categoryCombo, false, false, true, relatives, null, i18nFormat, "january_2000" );
-
-        reportTable.init();
-        
-        List<String> indexColumns = reportTable.getIndexColumns();
-
-        assertNotNull( indexColumns );
-        assertEquals( 2, indexColumns.size() );
-        assertTrue( indexColumns.contains( ReportTable.INDICATOR_ID ) );
-        assertTrue( indexColumns.contains( ReportTable.PERIOD_ID ) );
-
-        List<String> indexNameColumns = reportTable.getIndexNameColumns();
-
-        assertNotNull( indexNameColumns );
-        assertEquals( 2, indexNameColumns.size() );
-        assertTrue( indexNameColumns.contains( ReportTable.INDICATOR_NAME ) );
-        assertTrue( indexNameColumns.contains( ReportTable.PERIOD_NAME ) );
-
-        List<List<NameableObject>> columns = reportTable.getGridColumns();
-
-        assertNotNull( columns );
-        assertEquals( 4, columns.size() );
-
-        Iterator<List<NameableObject>> iterator = columns.iterator();
-        
-        assertEquals( getList( unitA, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( unitA, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( unitB, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( unitB, categoryOptionComboB ), iterator.next() );
-        
-        List<String> columnNames = getColumnNames( reportTable.getGridColumns() );
-        
-        assertNotNull( columnNames );
-        assertEquals( 4, columnNames.size() );
-
-        List<List<NameableObject>> rows = reportTable.getGridRows();
-        
-        assertNotNull( rows );
-        assertEquals( 8, rows.size() );
-
-        iterator = rows.iterator();
-        
-        assertEquals( getList( dataElementA, periodA ), iterator.next() );
-        assertEquals( getList( dataElementA, periodB ), iterator.next() );
-        assertEquals( getList( dataElementA, periodC ), iterator.next() );
-        assertEquals( getList( dataElementA, periodD ), iterator.next() );
-        assertEquals( getList( dataElementB, periodA ), iterator.next() );
-        assertEquals( getList( dataElementB, periodB ), iterator.next() );
-        assertEquals( getList( dataElementB, periodC ), iterator.next() );
-        assertEquals( getList( dataElementB, periodD ), iterator.next() );
-    }
-
-    @Test
-    public void testCategoryComboReportTableC()
-    {
-        ReportTable reportTable = new ReportTable( "Embezzlement",
-            dataElements, new ArrayList<Indicator>(), new ArrayList<DataSet>(), periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), categoryCombo, true, false, true, relatives, null, i18nFormat, "january_2000" );
-
-        reportTable.init();
-        
-        List<String> indexColumns = reportTable.getIndexColumns();
-
-        assertNotNull( indexColumns );
-        assertEquals( 1, indexColumns.size() );
-        assertTrue( indexColumns.contains( ReportTable.PERIOD_ID ) );
-
-        List<String> indexNameColumns = reportTable.getIndexNameColumns();
-
-        assertNotNull( indexNameColumns );
-        assertEquals( 1, indexNameColumns.size() );
-        assertTrue( indexNameColumns.contains( ReportTable.PERIOD_NAME ) );
-
-        List<List<NameableObject>> columns = reportTable.getGridColumns();
-        
-        assertNotNull( columns );
-        assertEquals( 8, columns.size() );
-        
-        Iterator<List<NameableObject>> iterator = columns.iterator();
-        
-        assertEquals( getList( dataElementA, unitA, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, unitA, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementA, unitB, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementA, unitB, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, unitA, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, unitA, categoryOptionComboB ), iterator.next() );
-        assertEquals( getList( dataElementB, unitB, categoryOptionComboA ), iterator.next() );
-        assertEquals( getList( dataElementB, unitB, categoryOptionComboB ), iterator.next() );
-
-        List<String> columnNames = getColumnNames( reportTable.getGridColumns() );
-        
-        assertNotNull( columnNames );
-        assertEquals( 8, columnNames.size() );
-
-        List<List<NameableObject>> rows = reportTable.getGridRows();
-        
-        assertNotNull( rows );
-        assertEquals( 4, rows.size() );
-
-        iterator = rows.iterator();
-        
-        assertEquals( getList( periodA ), iterator.next() );
-        assertEquals( getList( periodB ), iterator.next() );
-        assertEquals( getList( periodC ), iterator.next() );
-        assertEquals( getList( periodD ), iterator.next() );
-    }
 
     @Test
     public void testDataSetReportTableA()
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, true, false, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, true, false, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -1045,7 +872,7 @@
     {
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, false, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), false, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         
@@ -1087,7 +914,7 @@
     {        
         ReportTable reportTable = new ReportTable( "Embezzlement",
             new ArrayList<DataElement>(), new ArrayList<Indicator>(), dataSets, periods, relativePeriods, units, new ArrayList<OrganisationUnit>(), 
-            new ArrayList<OrganisationUnitGroup>(), null, true, false, true, relatives, null, i18nFormat, "january_2000" );
+            new ArrayList<OrganisationUnitGroup>(), true, false, true, relatives, null, i18nFormat, "january_2000" );
 
         reportTable.init();
         

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java	2013-02-26 17:45:20 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/SaveTableAction.java	2013-05-15 10:10:47 +0000
@@ -35,8 +35,6 @@
 
 import org.hisp.dhis.commons.action.AbstractRelativePeriodsAction;
 import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryService;
 import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.dataset.DataSetService;
@@ -77,13 +75,6 @@
         this.dataElementService = dataElementService;
     }
     
-    private DataElementCategoryService categoryService;
-
-    public void setCategoryService( DataElementCategoryService categoryService )
-    {
-        this.categoryService = categoryService;
-    }
-
     private IndicatorService indicatorService;
 
     public void setIndicatorService( IndicatorService indicatorService )
@@ -165,13 +156,6 @@
         this.cumulative = cumulative;
     }
 
-    private Integer categoryComboId;
-
-    public void setCategoryComboId( Integer categoryComboId )
-    {
-        this.categoryComboId = categoryComboId;
-    }
-
     private boolean doIndicators;
 
     public void setDoIndicators( boolean doIndicators )
@@ -305,8 +289,6 @@
             organisationUnitGroups.add( organisationUnitGroupService.getOrganisationUnitGroup( id ) );
         }
         
-        DataElementCategoryCombo categoryCombo = categoryComboId != null ? categoryService.getDataElementCategoryCombo( categoryComboId ) : null;
-        
         RelativePeriods relatives = getRelativePeriods();
         
         ReportParams reportParams = new ReportParams();
@@ -322,7 +304,7 @@
         {
             reportTable = new ReportTable( tableName,
                 dataElements, indicators, dataSets, periods, null, units, null, organisationUnitGroups,
-                categoryCombo, doIndicators, doPeriods, doOrganisationUnits, relatives, reportParams, null, null );
+                doIndicators, doPeriods, doOrganisationUnits, relatives, reportParams, null, null );
         }
         else
         {
@@ -336,7 +318,6 @@
             reportTable.setPeriods( periods );
             reportTable.setOrganisationUnits( units );
             reportTable.setOrganisationUnitGroups( organisationUnitGroups );
-            reportTable.setCategoryCombo( categoryCombo );
             reportTable.setDoIndicators( doIndicators );
             reportTable.setDoPeriods( doPeriods );
             reportTable.setDoUnits( doOrganisationUnits );

=== 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	2013-05-03 15:06:31 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2013-05-15 10:10:47 +0000
@@ -69,7 +69,6 @@
     scope="prototype">
     <property name="reportTableService" ref="org.hisp.dhis.reporttable.ReportTableService" />
     <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
-    <property name="categoryService" ref="org.hisp.dhis.dataelement.DataElementCategoryService" />
     <property name="indicatorService" ref="org.hisp.dhis.indicator.IndicatorService" />
     <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
     <property name="organisationUnitGroupService" ref="org.hisp.dhis.organisationunit.OrganisationUnitGroupService" />

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm	2013-03-21 09:57:44 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm	2013-05-15 10:10:47 +0000
@@ -22,8 +22,7 @@
 				 <tr>
 				 	<td>#filterDiv( "displayManageTableForm" )</td>
                     <td colspan="10" style="text-align:right">
-                    	<input type="button" value="$i18n.getString( 'add_report_table' )" style="width:220px" onclick="window.location.href='displayAddTableForm.action?dimension=false'"><br>
-                    	<input type="button" value="$i18n.getString( 'add_dataelement_dimension_table' )" style="width:220px" onclick="window.location.href='displayAddTableForm.action?dimension=true'">                    	
+                    	<input type="button" value="$i18n.getString( 'add_report_table' )" style="width:220px" onclick="window.location.href='displayAddTableForm.action?dimension=false'">                 	
                     </td>
                 </tr>
 			</table>