=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java 2010-06-23 17:50:25 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTableService.java 2010-07-05 23:45:39 +0000 @@ -55,7 +55,7 @@ * @param format the I18nFormat to use. */ void createReportTables( int id, String mode, Integer reportingPeriod, - Integer parentOrganisationUnitId, Integer organisationUnitId, I18nFormat format ); + Integer parentOrganisationUnitId, Integer organisationUnitId, boolean doDataMart, I18nFormat format ); /** * Creates a report table. Exports the relevant data to data mart, updates === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/ReportTableInternalProcess.java 2010-07-05 23:45:39 +0000 @@ -92,7 +92,14 @@ { this.organisationUnitId = organisationUnitId; } + + private boolean doDataMart; + public void setDoDataMart( boolean doDataMart ) + { + this.doDataMart = doDataMart; + } + private I18nFormat format; public void setFormat( I18nFormat format ) @@ -116,6 +123,6 @@ @Override public void executeStatements() { - reportTableService.createReportTables( id, mode, reportingPeriod, parentOrganisationUnitId, organisationUnitId, format ); + reportTableService.createReportTables( id, mode, reportingPeriod, parentOrganisationUnitId, organisationUnitId, doDataMart, format ); } } === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2010-06-23 17:50:25 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2010-07-05 23:45:39 +0000 @@ -143,7 +143,7 @@ @Transactional public void createReportTables( int id, String mode, Integer reportingPeriod, - Integer parentOrganisationUnitId, Integer organisationUnitId, I18nFormat format ) + Integer parentOrganisationUnitId, Integer organisationUnitId, boolean doDataMart, I18nFormat format ) { for ( ReportTable reportTable : getReportTables( id, mode ) ) { @@ -204,7 +204,7 @@ // Create report table // ----------------------------------------------------------------- - createReportTable( reportTable, true ); + createReportTable( reportTable, doDataMart ); } } === 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-04-12 21:23:33 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/CreateTableAction.java 2010-07-05 23:45:39 +0000 @@ -110,6 +110,13 @@ this.organisationUnitId = organisationUnitId; } + private boolean doDataMart; + + public void setDoDataMart( boolean doDataMart ) + { + this.doDataMart = doDataMart; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -128,6 +135,7 @@ process.setReportingPeriod( reportingPeriod ); process.setParentOrganisationUnitId( parentOrganisationUnitId ); process.setOrganisationUnitId( organisationUnitId ); + process.setDoDataMart( doDataMart ); process.setFormat( format ); processCoordinator.requestProcessExecution( executor ); === 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-07-05 21:00:54 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2010-07-05 23:45:39 +0000 @@ -274,6 +274,9 @@ month = Month year = Year total = Total +data_source = Data source +aggregate_data = Aggregate data +use_existing_data = Use existing data select_dimension = Select dimension tally_sheet_report = Tally Sheet report data_completeness_report = Data Completeness Report === 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-07-05 21:54:20 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/inputReportParamsForm.vm 2010-07-05 23:45:39 +0000 @@ -6,32 +6,41 @@ -#if ( $mode == "status" ) +#if ( $mode == "status" ) #end - - -#if ( $mode == "report" && $!reportParams.isSet() == false ) - -#end - - - -#if ( $mode == "table" && $!reportParams.isSet() == false ) +#if ( $mode == "table" && $!reportParams.isSet() == false ) #end - - - + + + + #if ( $mode == "report" ) + + + + + + + + + + + + #end + #if ( $!reportParams.isParamReportingMonth() ) @@ -102,16 +111,12 @@ === 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-07-05 21:54:20 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/report.js 2010-07-05 23:45:39 +0000 @@ -16,7 +16,7 @@ function runAndViewReport( reportId, reportUrl ) { - var url = "createTable.action?id=" + reportId + "&mode=report"; + var url = "createTable.action?id=" + reportId + "&doDataMart=" + getListValue( "doDataMart" ) + "&mode=report"; if ( document.getElementById( "reportingPeriod" ) != null ) { @@ -74,7 +74,7 @@ } else { - setWaitMessage( i18n_please_wait + ". " + statusMessage + "..." ); + setWaitMessage( i18n_please_wait + " - " + statusMessage ); waitAndGetReportStatus( 2000 ); } === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm 2010-06-15 03:12:16 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewReportForm.vm 2010-07-05 23:45:39 +0000 @@ -17,19 +17,21 @@ - - + #foreach ( $report in $reports ) - - +
$i18n.getString( "data_source" )
+ +
- #if ( $mode == "table" && $!reportParams.isSet() ) - - #end #if ( $mode == "table" || $mode == "status" ) + #end - #if ( $mode == "report" && $!reportParams.isSet() ) + #if ( $mode == "report" ) - #end - #if ( $mode == "report" ) #end
$i18n.getString( "name" )$i18n.getString( "operations" )$i18n.getString( "operations" )
$encoder.htmlEncode( $report.name )#if ( $report.hasReportTable )$i18n.getString( 'generate_datasource_and_view_report' )#end$i18n.getString( 'view_report_based_on_existing_datasource' ) + #if ( $report.hasReportTable ) + #else #end + $i18n.getString( 'create' ) + $i18n.getString( 'edit_report' ) $i18n.getString( 'add_to_dashboard' ) $i18n.getString( 'remove_report' )