=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2011-07-22 04:09:05 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/report/Report.java 2011-09-19 13:34:58 +0000 @@ -51,6 +51,8 @@ private ReportTable reportTable; + private Boolean usingOrgUnitGroupSets; + private Set groups = new HashSet(); // ------------------------------------------------------------------------- @@ -104,6 +106,11 @@ { return reportTable != null; } + + public boolean isUsingOrganisationUnitGroupSets() + { + return usingOrgUnitGroupSets != null && usingOrgUnitGroupSets; + } // ------------------------------------------------------------------------- // Equals and hashCode @@ -168,6 +175,16 @@ this.reportTable = reportTable; } + public Boolean getUsingOrgUnitGroupSets() + { + return usingOrgUnitGroupSets; + } + + public void setUsingOrgUnitGroupSets( Boolean usingOrgUnitGroupSets ) + { + this.usingOrgUnitGroupSets = usingOrgUnitGroupSets; + } + public Set getGroups() { return groups; === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java' --- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java 2011-09-18 14:36:11 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/impl/DefaultReportService.java 2011-09-19 13:34:58 +0000 @@ -131,7 +131,10 @@ { ReportTable reportTable = report.getReportTable(); - params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) ); + if ( report.isUsingOrganisationUnitGroupSets() ) + { + params.putAll( reportTable.getOrganisationUnitGroupMap( organisationUnitGroupService.getCompulsoryOrganisationUnitGroupSets() ) ); + } Grid grid = reportTableService.getReportTableGrid( reportTable.getId(), format, reportingPeriod, organisationUnitId ); === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml' --- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml 2011-07-28 03:25:28 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/report/hibernate/Report.hbm.xml 2011-09-19 13:34:58 +0000 @@ -21,12 +21,13 @@ + + - \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2011-05-05 21:15:45 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/reportviewer/action/AddReportAction.java 2011-09-19 13:34:58 +0000 @@ -102,6 +102,13 @@ this.reportTableId = reportTableId; } + private boolean usingOrgUnitGroupSets; + + public void setUsingOrgUnitGroupSets( boolean usingOrgUnitGroupSets ) + { + this.usingOrgUnitGroupSets = usingOrgUnitGroupSets; + } + private File file; public void setUpload( File file ) @@ -183,6 +190,7 @@ report.setName( name ); report.setReportTable( reportTableService.getReportTable( reportTableId ) ); + report.setUsingOrgUnitGroupSets( usingOrgUnitGroupSets ); log.info( "Upload file name: " + fileName + ", content type: " + contentType ); === 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-09-16 09:29:21 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-09-19 13:34:58 +0000 @@ -386,4 +386,5 @@ range_axis_label_y = Range axis label (y) leaf_parent_organisation_unit = Leaf organisation units reporting_bimonth = Reporting bimonth -reporting_quarter = Reporting quarter \ No newline at end of file +reporting_quarter = Reporting quarter +include_organisation_unit_group_sets = Include org unit group sets param \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm 2011-04-15 14:57:44 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addReportForm.vm 2011-09-19 13:34:58 +0000 @@ -38,6 +38,15 @@ + + + + + +