=== 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 2010-10-29 12:39:33 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2010-12-10 19:33:05 +0000 @@ -74,6 +74,7 @@ public static final String ORGANISATIONUNIT_NAME = "organisationunitname"; public static final String REPORTING_MONTH_COLUMN_NAME = "reporting_month_name"; + public static final String PARAM_ORGANISATIONUNIT_COLUMN_NAME = "param_organisationunit_name"; public static final String SEPARATOR = "_"; public static final String SPACE = " "; @@ -290,9 +291,14 @@ private transient I18nFormat i18nFormat; /** - * The name of the reporting month. + * The name of the reporting month based on the report param. */ private String reportingMonthName; + + /** + * The name of the (parent) organisation unit based on the report param. + */ + private String organisationUnitName; /** * The category option combos derived from the dimension set. @@ -1376,6 +1382,16 @@ this.reportingMonthName = reportingMonthName; } + public String getOrganisationUnitName() + { + return organisationUnitName; + } + + public void setOrganisationUnitName( String organisationUnitName ) + { + this.organisationUnitName = organisationUnitName; + } + public List getDimensionOptions() { return dimensionOptions; === 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-11-29 17:23:10 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/impl/DefaultReportTableService.java 2010-12-10 19:33:05 +0000 @@ -183,6 +183,7 @@ { OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId ); reportTable.getRelativeUnits().addAll( new ArrayList( organisationUnit.getChildren() ) ); + reportTable.setOrganisationUnitName( organisationUnit.getName() ); log.info( "Parent organisation unit: " + organisationUnit.getName() ); } @@ -198,6 +199,7 @@ List organisationUnits = new ArrayList(); organisationUnits.add( organisationUnit ); reportTable.getRelativeUnits().addAll( organisationUnits ); + reportTable.setOrganisationUnitName( organisationUnit.getName() ); log.info( "Organisation unit: " + organisationUnit.getName() ); } @@ -477,10 +479,16 @@ } // ----------------------------------------------------- - // Reporting month name + // Param reporting month name // ----------------------------------------------------- grid.addValue( reportTable.getReportingMonthName() ); + + // ----------------------------------------------------- + // Param organisation unit name + // ----------------------------------------------------- + + grid.addValue( reportTable.getOrganisationUnitName() ); // ----------------------------------------------------- // Values === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/statement/CreateReportTableStatement.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/statement/CreateReportTableStatement.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/statement/CreateReportTableStatement.java 2010-12-10 19:33:05 +0000 @@ -82,12 +82,18 @@ } // --------------------------------------------------------------------- - // Reporting month name + // Param reporting month name // --------------------------------------------------------------------- buffer.append( ReportTable.REPORTING_MONTH_COLUMN_NAME + SPACE + LONG_TEXT_COLUMN_TYPE + SEPARATOR ); // --------------------------------------------------------------------- + // Param organisation unit name + // --------------------------------------------------------------------- + + buffer.append( ReportTable.PARAM_ORGANISATIONUNIT_COLUMN_NAME + SPACE + LONG_TEXT_COLUMN_TYPE + SEPARATOR ); + + // --------------------------------------------------------------------- // Crosstab // ---------------------------------------------------------------------