← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2878: Adjusted GUI for report table to use the indicator-dataelement-dataset-in-one functionality. Ther...

 

------------------------------------------------------------
revno: 2878
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-02-18 22:50:37 +0100
message:
  Adjusted GUI for report table to use the indicator-dataelement-dataset-in-one functionality. There is a slight compatibility break to be aware of in that column names 'dataelementid'/'datasetid' and 'dataelementname'/'datasetname' will be replaced by 'indicatorid' and 'indicatorname' since we can potentially have all object types together.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js
  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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java	2011-02-16 17:16:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java	2011-02-18 21:50:37 +0000
@@ -38,7 +38,6 @@
 
 import org.apache.commons.collections.CollectionUtils;
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
-import org.hisp.dhis.common.GenericStore;
 import org.hisp.dhis.system.util.Filter;
 import org.hisp.dhis.system.util.FilterUtils;
 import org.hisp.dhis.system.util.UUIdUtils;

=== 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	2011-02-02 16:34:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java	2011-02-18 21:50:37 +0000
@@ -84,6 +84,7 @@
         executeSql( "DROP TABLE reporttable_categoryoptioncombos" );
         executeSql( "DROP TABLE dashboardcontent_datamartexports" );
         executeSql( "DROP TABLE customvalue" );
+        executeSql( "DROP TABLE reporttable_displaycolumns" );
         executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" );
         executeSql( "ALTER TABLE reporttable DROP column dimensiontype" );
         executeSql( "ALTER TABLE categoryoptioncombo DROP COLUMN displayorder" );
@@ -98,7 +99,7 @@
         executeSql( "DELETE FROM periodtype WHERE name='Relative'" );
 
         // mapping
-        executeSql( "DROP TABLE mapOrganisationUnitRelation" );
+        executeSql( "DROP TABLE maporganisationunitrelation" );
         executeSql( "ALTER TABLE mapview DROP COLUMN mapid" );
         executeSql( "DROP TABLE map" );
         

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetReportParamsAction.java	2011-02-18 21:50:37 +0000
@@ -195,12 +195,9 @@
                 
                 for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ )
                 {
-                    int month = i + 1;
-    
-                    cal.add( Calendar.MONTH, -1 );
-                    
-                    Period period = periodType.createPeriod( cal.getTime() );
-                    
+                    int month = i + 1;    
+                    cal.add( Calendar.MONTH, -1 );                    
+                    Period period = periodType.createPeriod( cal.getTime() );                    
                     String periodName = format.formatPeriod( period );
                     
                     reportingPeriods.put( month, periodName );

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java	2011-02-17 17:14:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/GetTableOptionsAction.java	2011-02-18 21:50:37 +0000
@@ -168,19 +168,7 @@
     {
         this.id = id;
     }
-    
-    private String mode;
-
-    public String getMode()
-    {
-        return mode;
-    }
-
-    public void setMode( String mode )
-    {
-        this.mode = mode;
-    }
-    
+        
     private boolean dimension;
 
     public boolean isDimension()
@@ -333,36 +321,41 @@
         // Available metadata
         // ---------------------------------------------------------------------
 
-        dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
-        
-        Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
-        
-        dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
-        
-        Collections.sort( dataElements, new DataElementNameComparator() );
-        
-        FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
-        
-        displayPropertyHandler.handle( dataElements );
-        
-        categoryCombos = new ArrayList<DataElementCategoryCombo>( categoryService.getAllDataElementCategoryCombos() );
-        
-        Collections.sort( categoryCombos, new DataElementCategoryComboNameComparator() );
-        
-        indicatorGroups = new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() );
-        
-        Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() );
-                
-        indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
-        
-        Collections.sort( indicators, indicatorComparator );
-        
-        displayPropertyHandler.handle( indicators );
-        
-        dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
-        
-        Collections.sort( dataSets, new DataSetNameComparator() ); 
-    
+        if ( dimension )
+        {
+            categoryCombos = new ArrayList<DataElementCategoryCombo>( categoryService.getAllDataElementCategoryCombos() );
+            
+            Collections.sort( categoryCombos, new DataElementCategoryComboNameComparator() );            
+        }
+        else
+        {        
+            dataElementGroups = new ArrayList<DataElementGroup>( dataElementService.getAllDataElementGroups() );
+            
+            Collections.sort( dataElementGroups, new DataElementGroupNameComparator() );
+            
+            dataElements = new ArrayList<DataElement>( dataElementService.getAllDataElements() );
+            
+            Collections.sort( dataElements, new DataElementNameComparator() );
+            
+            FilterUtils.filter( dataElements, new AggregatableDataElementFilter() );
+            
+            displayPropertyHandler.handle( dataElements );
+            
+            indicatorGroups = new ArrayList<IndicatorGroup>( indicatorService.getAllIndicatorGroups() );
+            
+            Collections.sort( indicatorGroups, new IndicatorGroupNameComparator() );
+                    
+            indicators = new ArrayList<Indicator>( indicatorService.getAllIndicators() );
+            
+            Collections.sort( indicators, indicatorComparator );
+            
+            displayPropertyHandler.handle( indicators );
+            
+            dataSets = new ArrayList<DataSet>( dataSetService.getAllDataSets() );
+            
+            Collections.sort( dataSets, new DataSetNameComparator() ); 
+        }
+        
         periodTypes = periodService.getAllPeriodTypes();
         
         periods = new MonthlyPeriodType().generatePeriods( new Date() );
@@ -389,11 +382,8 @@
         for ( int i = 0; i < AVAILABLE_REPORTING_MONTHS; i++ )
         {
             int month = i + 1;
-
-            cal.add( Calendar.MONTH, -1 );
-            
-            Period period = periodType.createPeriod( cal.getTime() );
-            
+            cal.add( Calendar.MONTH, -1 );            
+            Period period = periodType.createPeriod( cal.getTime() );            
             String periodName = format.formatPeriod( period );
             
             reportingPeriods.put( month, periodName );

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2011-02-03 16:35:12 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2011-02-18 21:50:37 +0000
@@ -61,8 +61,7 @@
 crosstab_organisation_units= Crosstab organisation units
 cannot_crosstab_all_dimensions= You cannot crosstabulate all dimensions
 cannot_crosstab_no_dimensions= Please select at least one dimension
-must_select_at_least_one_dataelement= Please select at least one dataelement
-must_select_at_least_one_indicator= Please select at least one indicator
+must_select_at_least_one_indictor_data_element_data_set = Please select at least one indicator, data element or data set
 must_select_at_least_one_unit= Please select at least one organisation unit
 must_select_at_least_one_period= Please select at least one period
 cannot_include_more_organisation_unit_regression = Cannot include more that one organisation unit with regression
@@ -101,7 +100,7 @@
 data_completeness_report= Data Completeness Report
 edit_report= Edit report
 processing= Processing
-report_configuration= Report Configuration
+indicators_data_elements_data_sets = Indicators / data elements / data sets
 set_configuration= Please set the configuration in order for the report module to work properly
 home_explanation= Home refers to the absolute path to the BIRT viewer web application on the server
 directory_explanation= Directory refers to the part of the URL coming after the server part pointing to the BIRT viewer web application
@@ -145,9 +144,7 @@
 quarters_this_year= Quarters this year
 selected_report_tables= Selected report tables
 available_report_tables= Available report tables
-add_indicator_table= Add Indicator Table
-add_dataelement_table= Add Dataelement Table
-add_dataset_table= Add Dataset Table
+add_report_table = Add Report Table
 add_dataelement_dimension_table = Add Dataelement Dimension Table
 preview= Preview
 generate= Generate

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm	2011-01-31 19:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addTableForm.vm	2011-02-18 21:50:37 +0000
@@ -11,9 +11,9 @@
 	
 	<colgroup>
   		<col style="width:120px">
-  		<col style="width:300px">
- 		<col style="width:160px">
- 		<col style="width:60px">
+  		<col style="width:290px">
+ 		<col style="width:200px">
+ 		<col style="width:30px">
   	</colgroup>
 	
 	<tr>
@@ -23,7 +23,7 @@
 	<tr>
 		<td><label for="tableName">$i18n.getString( "name" )</label></td>
 		<td><input type="text" id="tableName" name="tableName" style="width:270px" value="$!reportTable.name"></td>
-		<td><label for="doIndicators">$i18n.getString( $mode )</label></td>
+		<td><label for="doIndicators">$i18n.getString( "indicators_data_elements_data_sets" )</label></td>
 		<td><input type="checkbox" id="doIndicators" name="doIndicators" value="true"#if( $reportTable.doIndicators ) checked#end></td>
 	</tr>
 	<tr>
@@ -47,83 +47,25 @@
 
 <table>
 		
-    <!-- DataElements -->
-    
-    #if ( $mode == "dataelements" )
-    
-    <tr>
-        <th>$i18n.getString( "available_dataelements" )</th>      
-    </tr>
-    
-        <!-- Non-Dimensional -->
-    
-	    #if ( !$dimension )
-	    
-	    <tr>
-	        <td>
-	            <select id="dataElementGroupId" name="dataElementGroupId" style="min-width:640px" onchange="getDataElements()">
-	                <option value="$ALL">[ $i18n.getString( "select_dataelementgroup_all" ) ]</option>
-	                #foreach ( $group in $dataElementGroups )
-	                    <option value="$group.id">$encoder.htmlEncode( $group.name )</option>
-	                #end
-	            </select>
-	        </td>
-	    </tr>
-	    
-	    <!-- Dimensional -->
-	    
-	    #else
-	    
-        <tr>
-            <td>
-                <select id="categoryComboId" name="categoryComboId" style="min-width:640px" onchange="getCategoryComboDataElements()">
-                    <option value="-1">[ $i18n.getString( "select_category_combo" ) ]</option>
-                    #foreach ( $categoryCombo in $categoryCombos )
-                        <option value="$categoryCombo.id">$encoder.htmlEncode( $categoryCombo.name )</option>
-                    #end
-                </select>
-            </td>
-        </tr>
-        
-	    #end
-    
-    <tr>
-        <td>
-            <select multiple size="6" id="availableDataElements" name="availableDataElements" style="min-width:640px" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">             
-                #foreach ( $element in $dataElements )
-                    <option value="$element.id">$encoder.htmlEncode( $element.name )</option>
-                #end
-            </select>
-        </td>
-    </tr>
-    <tr>
-        <td>
-            <input type="button" value="$i18n.getString( 'add_selected' )" title="$i18n.getString( 'add_selected' )" style="width:120px" onclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"><input 
-                type="button" value="$i18n.getString( 'add_all' )" title="$i18n.getString( 'add_all' )" style="width:120px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"><input 
-                type="button" value="$i18n.getString( 'remove_selected' )" title="$i18n.getString( 'remove_selected' )" style="width:120px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"><input 
-                type="button" value="$i18n.getString( 'remove_all' )" title="$i18n.getString( 'remove_all' )" style="width:120px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )">
-        </td>
-    </tr>
-    <tr>
-        <th>$i18n.getString( "selected_dataelements" )</th>
-    </tr>
-    <tr>
-        <td>
-            <select multiple size="6" id="selectedDataElements" name="selectedDataElements" style="min-width:640px" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
-                #foreach( $element in $selectedDataElements )
-                    <option value="$element.id">$encoder.htmlEncode( $element.name )</option>
-                #end
-            </select>
-        </td>
-    </tr>
-    <tr>
-        <td style="height:15px"></td>
-    </tr>
+    #if( $dimension )
+    
+    <!-- Dimensional -->
+    
+    <tr>
+        <td>
+            <select id="categoryComboId" name="categoryComboId" style="min-width:640px" onchange="getCategoryComboDataElements()">
+                <option value="-1">[ $i18n.getString( "select_category_combo" ) ]</option>
+                #foreach ( $categoryCombo in $categoryCombos )
+                    <option value="$categoryCombo.id">$encoder.htmlEncode( $categoryCombo.name )</option>
+                #end
+            </select>
+        </td>
+    </tr>
+    
+    #else
     
     <!-- Indicators -->
     
-    #elseif ( $mode == "indicators" )
-    
     <tr>
         <th>$i18n.getString( "available_indicators" )</th>      
     </tr>
@@ -170,10 +112,58 @@
         <td style="height:15px"></td>
     </tr>
     
+    <!-- DataElements -->
+    
+    <tr>
+        <th>$i18n.getString( "available_dataelements" )</th>      
+    </tr>
+    
+    <tr>
+        <td>
+            <select id="dataElementGroupId" name="dataElementGroupId" style="min-width:640px" onchange="getDataElements()">
+                <option value="$ALL">[ $i18n.getString( "select_dataelementgroup_all" ) ]</option>
+                #foreach ( $group in $dataElementGroups )
+                    <option value="$group.id">$encoder.htmlEncode( $group.name )</option>
+                #end
+            </select>
+        </td>
+    </tr>	    
+    
+    <tr>
+        <td>
+            <select multiple size="6" id="availableDataElements" name="availableDataElements" style="min-width:640px" ondblclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )">             
+                #foreach ( $element in $dataElements )
+                    <option value="$element.id">$encoder.htmlEncode( $element.name )</option>
+                #end
+            </select>
+        </td>
+    </tr>
+    <tr>
+        <td>
+            <input type="button" value="$i18n.getString( 'add_selected' )" title="$i18n.getString( 'add_selected' )" style="width:120px" onclick="moveSelectedById( 'availableDataElements', 'selectedDataElements' )"><input 
+                type="button" value="$i18n.getString( 'add_all' )" title="$i18n.getString( 'add_all' )" style="width:120px" onclick="moveAllById( 'availableDataElements', 'selectedDataElements' )"><input 
+                type="button" value="$i18n.getString( 'remove_selected' )" title="$i18n.getString( 'remove_selected' )" style="width:120px" onclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )"><input 
+                type="button" value="$i18n.getString( 'remove_all' )" title="$i18n.getString( 'remove_all' )" style="width:120px" onclick="moveAllById( 'selectedDataElements', 'availableDataElements' )">
+        </td>
+    </tr>
+    <tr>
+        <th>$i18n.getString( "selected_dataelements" )</th>
+    </tr>
+    <tr>
+        <td>
+            <select multiple size="6" id="selectedDataElements" name="selectedDataElements" style="min-width:640px" ondblclick="moveSelectedById( 'selectedDataElements', 'availableDataElements' )">
+                #foreach( $element in $selectedDataElements )
+                    <option value="$element.id">$encoder.htmlEncode( $element.name )</option>
+                #end
+            </select>
+        </td>
+    </tr>
+    <tr>
+        <td style="height:15px"></td>
+    </tr>
+    
     <!-- DataSets -->
     
-    #elseif ( $mode == "datasets" )
-    
     <tr>
         <th>$i18n.getString( "available_datasets" )</th>
     </tr>
@@ -384,10 +374,7 @@
     var i18n_done = '$encoder.jsEscape( $i18n.getString( "done" ), "'")';
     var i18n_must_enter_name = '$encoder.jsEscape( $i18n.getString( "must_enter_name" ), "'")';
     var i18n_cannot_include_more_organisation_unit_regression = '$encoder.jsEscape( $i18n.getString( "cannot_include_more_organisation_unit_regression" ), "'")';
-    var i18n_cannot_crosstab_all_dimensions = '$encoder.jsEscape( $i18n.getString( "cannot_crosstab_all_dimensions" ), "'")';
-    var i18n_cannot_crosstab_no_dimensions = '$encoder.jsEscape( $i18n.getString( "cannot_crosstab_no_dimensions" ), "'")';
-    var i18n_must_select_at_least_one_dataelement = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_dataelement" ), "'")';
-    var i18n_must_select_at_least_one_indicator = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_indicator" ), "'")';
+    var i18n_must_select_at_least_one_indictor_data_element_data_set = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_indictor_data_element_data_set" ), "'")';
     var i18n_must_select_at_least_one_unit = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_unit" ), "'")';
     var i18n_must_select_at_least_one_period = '$encoder.jsEscape( $i18n.getString( "must_select_at_least_one_period" ), "'")';
     var i18n_cannot_select_orgunit_and_parent_orgunit_param = '$encoder.jsEscape( $i18n.getString( "cannot_select_orgunit_and_parent_orgunit_param" ), "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm	2011-01-10 10:06:18 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm	2011-02-18 21:50:37 +0000
@@ -76,12 +76,16 @@
         
     <tr>
         <td>
+        	#if( $!reportParams.isSet() )
+        	
             <input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport()" style="width:140px">
         	#if ( $mode == "table" )
             <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:140px">
         	#elseif ( $mode == "report" )
             <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayViewReportForm.action'" style="width:140px">
         	#end
+        	
+            #end
         </td>
     </tr>
     
@@ -94,3 +98,9 @@
     var i18n_please_wait = '$encoder.jsEscape( $i18n.getString( "please_wait" ), "'")';
 	var i18n_please_select_unit = '$encoder.jsEscape( $i18n.getString( "select_organisation_unit" ), "'")';
 </script>
+
+#if( !$!reportParams.isSet() )
+<script type="text/javascript">
+generateReport();
+</script>
+#end

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js	2011-01-06 09:03:29 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js	2011-02-18 21:50:37 +0000
@@ -37,21 +37,9 @@
 
 function selectTableForm()
 {
-    if ( isNotNull( "selectedDataElements" ) )
-    {
-        selectAllById( "selectedDataElements" );
-    }
-    
-    if ( isNotNull( "selectedIndicators" ) )
-    {
-       selectAllById( "selectedIndicators" );
-    }
-        
-    if ( isNotNull( "selectedDataSets" ) )
-    {
-        selectAllById( "selectedDataSets" );
-    }
-    
+    selectAllById( "selectedDataElements" );
+    selectAllById( "selectedIndicators" );
+    selectAllById( "selectedDataSets" );
     selectAllById( "selectedPeriods" );
     selectAllById( "selectedOrganisationUnits" );   
 }
@@ -77,35 +65,14 @@
         
         return false;
     }
-    
-    if ( isChecked( "doIndicators" ) && isChecked( "doPeriods" ) && isChecked( "doOrganisationUnits" ) )
-    {
-        setMessage( i18n_cannot_crosstab_all_dimensions );
-        
-        return false;
-    }
-    
-    if ( !isTrue( "dimension" ) && !isChecked( "doIndicators" ) && !isChecked( "doPeriods" ) && !isChecked( "doOrganisationUnits" ) )
-    {
-        setMessage( i18n_cannot_crosstab_no_dimensions );
-        
-        return false;
-    }
-    
-    if ( isNotNull( "selectedDataElements" ) && !hasElements( "selectedDataElements" ) )
-    {
-        setMessage( i18n_must_select_at_least_one_dataelement );
-        
-        return false;
-    }
-    
-    if ( isNotNull( "selectedIndicators" ) && !hasElements( "selectedIndicators" ) )
-    {
-        setMessage( i18n_must_select_at_least_one_indicator );
-        
-        return false;
-    }
-    
+        
+    if ( !hasElements( "selectedDataElements" ) && !hasElements( "selectedIndicators" ) && !hasElements( "selectedDataSets" ) )
+    {
+        setMessage( i18n_must_select_at_least_one_indictor_data_element_data_set );
+        
+        return false;
+    }
+        
     if ( !hasElements( "selectedOrganisationUnits" ) && !organisationUnitReportParamsChecked() )
     {
         setMessage( i18n_must_select_at_least_one_unit );

=== 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	2011-01-25 13:49:21 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm	2011-02-18 21:50:37 +0000
@@ -8,10 +8,8 @@
 				 <tr>
 				 	<td>#filterDiv( "displayManageTableForm" )</td>
                     <td colspan="10" style="text-align:right">
-                    	<input type="button" value="$i18n.getString( 'add_indicator_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?mode=indicators'"><br>
-                    	<input type="button" value="$i18n.getString( 'add_dataelement_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?mode=dataelements'"><br>
-                        <input type="button" value="$i18n.getString( 'add_dataelement_dimension_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?mode=dataelements&dimension=true'"><br>
-                    	<input type="button" value="$i18n.getString( 'add_dataset_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?mode=datasets'">
+                    	<input type="button" value="$i18n.getString( 'add_report_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?dimension=false'"><br>
+                    	<input type="button" value="$i18n.getString( 'add_dataelement_dimension_table' )" style="width:250px" onclick="window.location.href='displayAddTableForm.action?dimension=true'">                    	
                     </td>
                 </tr>
 			</table>