← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2383: Made the way report tables are generated and presented more like the rest (reports, charts). Afte...

 

------------------------------------------------------------
revno: 2383
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-12-15 18:52:50 +0100
message:
  Made the way report tables are generated and presented more like the rest (reports, charts). After clicking create user is presented with the report params screen and option for getting report table as html, xsl, csv. Getting rid of some of the icons in the overcrowded report table list. Centralized the javascript code.
removed:
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/VerifyReportTableAction.java
added:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.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/org/hisp/dhis/reporting/i18n_module.properties
  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/inputReportParamsForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js
  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/responseReportTableData.vm
  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-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java	2010-11-29 17:23:10 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java	2010-12-15 17:52:50 +0000
@@ -89,6 +89,13 @@
         this.mode = mode;
     }
 
+    private boolean doDataMart;
+
+    public void setDoDataMart( boolean doDataMart )
+    {
+        this.doDataMart = doDataMart;
+    }
+
     private Integer reportingPeriod;
 
     public void setReportingPeriod( Integer reportingPeriod )
@@ -103,13 +110,6 @@
         this.organisationUnitId = organisationUnitId;
     }
     
-    private boolean doDataMart;
-
-    public void setDoDataMart( boolean doDataMart )
-    {
-        this.doDataMart = doDataMart;
-    }
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/VerifyReportTableAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/VerifyReportTableAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/VerifyReportTableAction.java	1970-01-01 00:00:00 +0000
@@ -1,70 +0,0 @@
-package org.hisp.dhis.reporting.tablecreator.action;
-
-/*
- * 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 org.hisp.dhis.reporttable.ReportTableService;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- */
-public class VerifyReportTableAction
-    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;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        return reportTableService.reportTableIsGenerated( id ) ? SUCCESS : ERROR;
-    }
-}

=== 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	2010-12-14 11:36:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-12-15 17:52:50 +0000
@@ -287,14 +287,7 @@
     <property name="dimensionService"
       ref="org.hisp.dhis.dimension.DimensionService"/>
   </bean>
-  
-  <bean id="org.hisp.dhis.reporting.tablecreator.action.VerifyReportTableAction"
-	class="org.hisp.dhis.reporting.tablecreator.action.VerifyReportTableAction"
-	scope="prototype">
-    <property name="reportTableService"
-      ref="org.hisp.dhis.reporttable.ReportTableService"/>
-  </bean>
-  
+    
   <!-- ReportViewer -->
   
   <bean id="org.hisp.dhis.reporting.reportviewer.action.AddReportAction"

=== 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	2010-12-14 11:36:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2010-12-15 17:52:50 +0000
@@ -298,4 +298,7 @@
 orgunit_distribution = Organisation unit distribution report
 get_report = Get report
 get_chart = Get chart
-group_set = Group set
\ No newline at end of file
+group_set = Group set
+get_report = Get report
+get_report_as_xsl = Get report as Excel
+get_report_as_csv = Get report as CSV
\ No newline at end of file

=== 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	2010-12-14 11:36:39 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2010-12-15 17:52:50 +0000
@@ -209,7 +209,7 @@
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-reporting/inputReportParamsForm.vm</param>
       <param name="menu">/dhis-web-reporting/menu.vm</param>
-      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/report.js,javascript/table.js</param>
+      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/generateReport.js</param>
       <param name="requiredAuthorities">F_REPORT_VIEW</param>
     </action>
     
@@ -280,12 +280,7 @@
       <result name="success" type="velocity">/dhis-web-commons/ajax/xmlDataElements.vm</result>
       <param name="onExceptionReturn">plainTextError</param>
     </action>
-        
-	<action name="verifyReportTable" class="org.hisp.dhis.reporting.tablecreator.action.VerifyReportTableAction">
-		<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>
-	</action>
-		
+        		
     <!-- PivotTable -->
     
     <action name="displayPivotTableForm" class="org.hisp.dhis.reporting.action.NoAction">

=== 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	2010-11-29 22:36:15 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm	2010-12-15 17:52:50 +0000
@@ -3,12 +3,7 @@
 
 <input type="hidden" id="id" name="id" value="$!id">
 <input type="hidden" id="mode" name="mode" value="$!mode">
-
-#if ( $mode == "status" ) <!-- Keep the process running and show status -->
-	<script type="text/javascript">
-	   getTableStatus();
-	</script>
-#else <!-- Show input params -->
+<input type="hidden" id="url" name="url" value="$!url">
 
 <table>
 	
@@ -78,11 +73,13 @@
     <tr>        
         <td>
         #if ( $mode == "table" )
-            <input type="button" value="$i18n.getString( 'ok' )" onclick="createTable( '$id' )" style="width:120px">        
-            <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:120px">
+            <input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport( 'html' )" style="width:120px">
+            <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:120px"><br><br>
+            <input type="button" value="$i18n.getString( 'get_report_as_xsl' )" onclick="generateReport( 'xsl' )" style="width:120px">
+            <input type="button" value="$i18n.getString( 'get_report_as_csv' )" onclick="generateReport( 'csv' )" style="width:120px">
         #end
         #if ( $mode == "report" )
-            <input type="button" value="$i18n.getString( 'ok' )" style="width:120px" onclick="runAndViewReport( '$id', '$url' )">
+            <input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport( '' )" style="width:120px">
             <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayViewReportForm.action'" style="width:120px">
         #end
         </td>
@@ -90,8 +87,6 @@
     
 </table>
 
-#end
-
 <span id="message"></span>
 
 <script type="text/javascript">

=== added file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/generateReport.js	2010-12-15 17:52:50 +0000
@@ -0,0 +1,238 @@
+
+var FORMAT_HTML = "html";
+var FORMAT_XSL = "xsl";
+var FORMAT_CSV = "csv";
+
+var MODE_REPORT = "report";
+var MODE_TABLE = "table";
+
+var outputFormat = null;
+
+// -----------------------------------------------------------------------------
+// Report params
+// -----------------------------------------------------------------------------
+
+var paramOrganisationUnit = null;
+
+function paramOrganisationUnitSet( id )
+{
+	paramOrganisationUnit = id;
+}
+
+// -----------------------------------------------------------------------------
+// Validation
+// -----------------------------------------------------------------------------
+
+function validationError()
+{
+	if ( $( "#selectionTree" ).length && paramOrganisationUnit == null )
+	{
+		setMessage( i18n_please_select_unit );
+		return true;
+	}
+	
+	return false;
+}	
+
+// -----------------------------------------------------------------------------
+// Report
+// -----------------------------------------------------------------------------
+
+function generateReport( format )
+{
+	outputFormat = format;
+	
+	if ( validationError() )
+	{
+		return false;
+	}
+		
+    setWaitMessage( i18n_please_wait );
+        
+    var url = "createTable.action?id=" + $( "#id" ).val() + 
+    	"&doDataMart=" + $( "#doDataMart" ).val() + "&mode=" + $( "#mode" ).val();
+    
+    if ( $( "#reportingPeriod" ).length )
+    {
+        url += "&reportingPeriod=" + $( "#reportingPeriod" ).val();
+    }
+        
+    if ( paramOrganisationUnit != null )
+    {
+        url += "&organisationUnitId=" + paramOrganisationUnit;
+    }
+    
+    var request = new Request();
+    request.setCallbackSuccess( generateReportReceived );    
+    request.send( url );
+}
+
+function generateReportReceived( messageElement )
+{   
+    getReportStatus();
+}
+
+function getReportStatus()
+{   
+    var url = "getStatus.action";
+    
+    var request = new Request();
+    request.setResponseTypeXML( "status" );
+    request.setCallbackSuccess( reportStatusReceived );    
+    request.send( url );
+}
+
+function reportStatusReceived( xmlObject )
+{
+    var statusMessage = getElementValue( xmlObject, "statusMessage" );
+    var finished = getElementValue( xmlObject, "finished" );
+    
+    if ( finished == "true" )
+    {
+        setMessage( i18n_process_completed );
+        
+        if ( $( "#mode" ).val() == MODE_REPORT )
+        {
+        	window.location.href = $( "#url" ).val();
+        }
+        else if ( $( "#mode" ).val() == MODE_TABLE )
+        {
+        	if ( outputFormat == FORMAT_HTML )
+        	{
+        		window.location.href = "getTableData.action?id=" + $( "#id" ).val();
+        	}
+        	else if ( outputFormat == FORMAT_XSL )
+        	{
+        		window.location.href = "generateTableDataWorkbook.action?id=" + $( "#id" ).val();
+        	}
+        	else if ( outputFormat == FORMAT_CSV )
+        	{
+        		window.location.href = "getTableDataExport.action?exportFormat=CSV&id=" + $( "#id" ).val();
+        	}
+        }
+    }
+    else if ( statusMessage == null )
+    {
+        setWaitMessage( i18n_please_wait );
+        
+        waitAndGetReportStatus( 2000 );
+    }
+    else
+    {
+        setWaitMessage( i18n_please_wait + " - " + statusMessage );
+        
+        waitAndGetReportStatus( 2000 );
+    }
+}
+
+function waitAndGetReportStatus( millis )
+{
+    setTimeout( "getReportStatus();", millis );
+}
+
+// -----------------------------------------------------------------------------
+// ReportTable
+// -----------------------------------------------------------------------------
+/*
+function createTable( tableId )
+{
+	if ( validationError() )
+	{
+		return false;
+	}
+	
+    var url = "createTable.action?id=" + tableId + "&doDataMart=" + getListValue( "doDataMart" ) + "&mode=table";
+    
+    if ( document.getElementById( "reportingPeriod" ) != null )
+    {
+        url += "&reportingPeriod=" + getListValue( "reportingPeriod" );
+    }
+    
+    if ( paramOrganisationUnit != null )
+    {
+        url += "&organisationUnitId=" + paramOrganisationUnit;
+    }
+    
+    var request = new Request();
+    request.setCallbackSuccess( createTableReceived );    
+    request.send( url );
+}
+
+function createTableReceived( messageElement )
+{
+    getTableStatus();
+}
+
+function getTableStatus()
+{
+    var url = "getStatus.action";
+    
+    var request = new Request();
+    request.setResponseTypeXML( 'status' );
+    request.setCallbackSuccess( tableStatusReceived );    
+    request.send( url );
+}
+
+function tableStatusReceived( xmlObject )
+{
+    var statusMessage = getElementValue( xmlObject, 'statusMessage' );
+    var finished = getElementValue( xmlObject, 'finished' );
+    
+    if ( finished == "true" )
+    {
+        setMessage( i18n_process_completed );
+    }
+    else if ( statusMessage == null )
+    {
+        setWaitMessage( i18n_please_wait );
+    }
+    else
+    {
+        setWaitMessage( i18n_please_wait + " - " + statusMessage );
+    }
+    
+    waitAndGetTableStatus( 2000 );
+}
+
+function waitAndGetTableStatus( millis )
+{
+    setTimeout( "getTableStatus();", millis );
+}
+*/
+// -----------------------------------------------------------------------------
+// Export ReportTable
+// -----------------------------------------------------------------------------
+/*
+function exportToHtml( id )
+{
+	verifyAndExport( id, "getTableData.action?id=" + id );
+}
+
+function exportToExcel( id )
+{	
+	verifyAndExport( id, "generateTableDataWorkbook.action?id=" + id );
+}
+
+function exportToCsv( id )
+{
+	verifyAndExport( id, "getTableDataExport.action?exportFormat=CSV&id=" + id );
+}
+
+function verifyAndExport( id, url )
+{   
+    $.getJSON( 
+       "verifyReportTable.action",
+       { "id": id },
+       function( json )
+       {
+           if ( json.response == "error" )
+           {
+               setHeaderDelayMessage( i18n_generate_before_export );
+           }
+           else
+           {
+               window.location.href = url;
+           }
+       } );
+}
+*/
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js	2010-11-29 22:36:15 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js	2010-12-15 17:52:50 +0000
@@ -1,98 +1,4 @@
 
-var paramParentOrganisationUnit = null;
-var paramOrganisationUnit = null;
-
-function paramParentOrganisationUnitSet( id )
-{
-	paramParentOrganisationUnit = id;
-}
-
-function paramOrganisationUnitSet( id )
-{
-	paramOrganisationUnit = id;
-}
-
-var tempUrl = null;
-
-function runAndViewReport( reportId, reportUrl )
-{
-	if ( $( '#selectionTree' ).length && paramOrganisationUnit == null )
-	{
-		setMessage( i18n_please_select_unit );
-		return false;
-	}
-	
-    setWaitMessage( i18n_please_wait );
-        
-    var url = "createTable.action?id=" + reportId + "&doDataMart=" + getListValue( "doDataMart" ) + "&mode=report";
-    
-    if ( document.getElementById( "reportingPeriod" ) != null )
-    {
-        url += "&reportingPeriod=" + getListValue( "reportingPeriod" );
-    }
-    
-    if ( paramParentOrganisationUnit != null )
-    {
-        url += "&parentOrganisationUnitId=" + paramParentOrganisationUnit;
-    }
-    
-    if ( paramOrganisationUnit != null )
-    {
-        url += "&organisationUnitId=" + paramOrganisationUnit;
-    }
-    
-	tempUrl = reportUrl;
-    
-    var request = new Request();
-    request.setCallbackSuccess( runAndViewReportReceived );    
-    request.send( url );
-}
-
-function runAndViewReportReceived( messageElement )
-{   
-    getReportStatus();
-}
-
-function getReportStatus()
-{   
-    var url = "getStatus.action";
-    
-    var request = new Request();
-    request.setResponseTypeXML( "status" );
-    request.setCallbackSuccess( reportStatusReceived );    
-    request.send( url );
-}
-
-function reportStatusReceived( xmlObject )
-{
-    var statusMessage = getElementValue( xmlObject, "statusMessage" );
-    var finished = getElementValue( xmlObject, "finished" );
-    
-    if ( finished == "true" )
-    {
-        setMessage( i18n_process_completed );
-        
-        window.location.href = tempUrl;
-    }
-    else if ( statusMessage == null )
-    {
-        setWaitMessage( i18n_please_wait );
-        
-        waitAndGetReportStatus( 2000 );
-    }
-    else
-    {
-        setWaitMessage( i18n_please_wait + " - " + statusMessage );
-        
-        waitAndGetReportStatus( 2000 );
-    }
-}
-
-function waitAndGetReportStatus( millis )
-{
-    setTimeout( "getReportStatus();", millis );
-}
-
 function addReport()
 {
     selectAllById( "selectedReportTables" );

=== 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	2010-11-29 22:36:15 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/table.js	2010-12-15 17:52:50 +0000
@@ -1,81 +1,4 @@
 
-var paramOrganisationUnit = null;
-
-function paramOrganisationUnitSet( id )
-{
-	paramOrganisationUnit = id;
-}
-
-// -----------------------------------------------------------------------------
-// Create ReportTable
-// -----------------------------------------------------------------------------
-
-function createTable( tableId )
-{
-	if ( $( '#selectionTree' ).length && paramOrganisationUnit == null )
-	{
-		setMessage( i18n_please_select_unit );
-		return false;
-	}
-	
-    var url = "createTable.action?id=" + tableId + "&doDataMart=" + getListValue( "doDataMart" ) + "&mode=table";
-    
-    if ( document.getElementById( "reportingPeriod" ) != null )
-    {
-        url += "&reportingPeriod=" + getListValue( "reportingPeriod" );
-    }
-        
-    if ( paramOrganisationUnit != null )
-    {
-        url += "&organisationUnitId=" + paramOrganisationUnit;
-    }
-    
-    var request = new Request();
-    request.setCallbackSuccess( createTableReceived );    
-    request.send( url );
-}
-
-function createTableReceived( messageElement )
-{
-    getTableStatus();
-}
-
-function getTableStatus()
-{
-    var url = "getStatus.action";
-    
-    var request = new Request();
-    request.setResponseTypeXML( 'status' );
-    request.setCallbackSuccess( tableStatusReceived );    
-    request.send( url );
-}
-
-function tableStatusReceived( xmlObject )
-{
-    var statusMessage = getElementValue( xmlObject, 'statusMessage' );
-    var finished = getElementValue( xmlObject, 'finished' );
-    
-    if ( finished == "true" )
-    {
-        setMessage( i18n_process_completed );
-    }
-    else if ( statusMessage == null )
-    {
-        setWaitMessage( i18n_please_wait );
-    }
-    else
-    {
-        setWaitMessage( i18n_please_wait + " - " + statusMessage );
-    }
-    
-    waitAndGetTableStatus( 2000 );
-}
-
-function waitAndGetTableStatus( millis )
-{
-    setTimeout( "getTableStatus();", millis );
-}
-
 // -----------------------------------------------------------------------------
 // Save ReportTable
 // -----------------------------------------------------------------------------
@@ -356,40 +279,3 @@
 {
     window.location.href = 'displayManageTableForm.action';
 }
-
-// -----------------------------------------------------------------------------
-// Export
-// -----------------------------------------------------------------------------
-
-function exportToExcel( id )
-{	
-	verifyAndExport( id, "generateTableDataWorkbook.action?id=" + id );
-}
-
-function exportToHtml( id )
-{
-	verifyAndExport( id, "getTableData.action?id=" + id );
-}
-
-function exportToCsv( id )
-{
-	verifyAndExport( id, "getTableDataExport.action?exportFormat=CSV&id=" + id );
-}
-
-function verifyAndExport( id, url )
-{   
-    $.getJSON( 
-       "verifyReportTable.action",
-       { "id": id },
-       function( json )
-       {
-           if ( json.response == "error" )
-           {
-               setHeaderDelayMessage( i18n_generate_before_export );
-           }
-           else
-           {
-               window.location.href = url;
-           }
-       } );
-}

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableData.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableData.vm	2009-12-10 13:30:07 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/responseReportTableData.vm	2010-12-15 17:52:50 +0000
@@ -3,6 +3,8 @@
     #if( $mark ) class="listAlternateRow"#else class="listRow"#end
 #end
 
+<p><input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:120px"></p>
+
 <table class="listTable">
     <tr>
         <td style="text-align:center" colspan="$data.columns.values().size()"><h3>$data.name</h3></td>

=== 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	2010-12-13 16:32:50 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewTableForm.vm	2010-12-15 17:52:50 +0000
@@ -17,11 +17,11 @@
 			</table>
 			<table class="listTable" id="listTable">
 				<col>
-				<col width="256">				
+				<col width="165">				
                 <thead>		       
 				<tr>
 					<th>$i18n.getString( "name" )</th>
-					<th colspan="9" class="{sorter: false}">$i18n.getString( "operations" )</th>
+					<th class="{sorter: false}">$i18n.getString( "operations" )</th>
 				</tr>
 				</thead>
 				<tbody id="list">
@@ -32,9 +32,6 @@
 						<a href="getReportParams.action?id=$table.id&mode=table" title="$i18n.getString( "create" )"><img src="../images/start_process.png" alt="$i18n.getString( "create" )"></a>
 						<a href="displayAddTableForm.action?id=$table.id&mode=$table.mode&dimension=$table.isDimensional()" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
 						<a href="displayTable.action?id=$table.id" title="$i18n.getString( "display" )"><img src="../images/display.png" alt="$i18n.getString( "display" )"></a>
-						<a href="javascript:exportToExcel( $table.id )" title="$i18n.getString( "export_to_excel" )"><img src="../images/excel.png" alt="$i18n.getString( "export_to_excel" )"></a>
-						<a href="javascript:exportToHtml( $table.id )" title="$i18n.getString( "export_to_html" )"><img src="../images/html.png" alt="$i18n.getString( "export_to_html" )"></a>
-						<a href="javascript:exportToCsv( $table.id )" title="$i18n.getString( "export_to_csv" )"><img src="../images/csv.png" alt="$i18n.getString( "export_to_csv" )"></a>
 						<a href="javascript:addReportTableToDashboard( '$table.id' )" title="$i18n.getString( 'add_to_dashboard' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'add_to_dashboard' )"></a>
 						<a href="javascript:removeTable( $table.id, '$encoder.jsEncode( $table.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
 						<a href="javascript:showTableDetails( $table.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>