=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/resources/html-report-template.html' --- dhis-2/dhis-support/dhis-support-system/src/main/resources/html-report-template.html 2013-05-15 13:39:24 +0000 +++ dhis-2/dhis-support/dhis-support-system/src/main/resources/html-report-template.html 2013-06-08 16:53:04 +0000 @@ -19,7 +19,7 @@ - +

This is a template for HTML/javascript based reports

@@ -35,7 +35,7 @@ You can utilize the DHIS 2 Web API to render meta-data and data in your report. The Web API can be accessed from ../api. For instance, to retrieve the first page of data elements in JSON format you can link to ../api/dataElements.json. To -get access to aggregate data you can utilize the analytics controller at +get access to aggregate data you can utilize the analytics resource at ../api/analytics.

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java 2013-06-05 12:45:22 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java 2013-06-08 16:53:04 +0000 @@ -166,6 +166,12 @@ { Chart chart = chartService.getChartNoAcl( uid ); + if ( chart == null ) + { + ContextUtils.notFoundResponse( response, "Chart does not exist: " + uid ); + return; + } + OrganisationUnit unit = ou != null ? organisationUnitService.getOrganisationUnit( ou ) : null; JFreeChart jFreeChart = chartService.getJFreeChart( chart, date, unit, i18nManager.getI18nFormat() );