=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-06-14 18:56:38 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/tablecreator/action/ExportTableAction.java 2012-06-28 21:14:29 +0000 @@ -48,7 +48,8 @@ public class ExportTableAction implements Action { - private static final String DEFAULT_TYPE = "html"; + private static final String TYPE_DEFAULT = "html"; + private static final String TYPE_JRXML = "jrxml"; // ------------------------------------------------------------------------- // Dependencies @@ -159,8 +160,11 @@ { ReportTable reportTable = reportTableService.getReportTable( uid ); - params.putAll( constantService.getConstantParameterMap() ); - params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) ); + if ( TYPE_JRXML.equals( format ) ) + { + params.putAll( constantService.getConstantParameterMap() ); + params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) ); + } if ( useLast ) { @@ -175,6 +179,6 @@ SessionUtils.setSessionVar( SessionUtils.KEY_REPORT_TABLE_GRID, grid ); - return type != null ? type : DEFAULT_TYPE; + return type != null ? type : TYPE_DEFAULT; } }