dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39499
Pivot Tables (ReportTable) to Standard Report HTML report format
Hello All, am keenly interested to learn how to convert Pivot Tables
(ReportTable) to Standard Report HTML report format. I know how to do that
from event report to standard report html report format,
How can I arrange indicators, period which are connected to 2 Organization
Units?
Am used to the one having Program and program stage, But this does not
have, only Having indicator and 2 organization Units
Any Examples on How to complete it.
<script src="//dhis2-cdn.org/v219/ext/ext-all.js"></script>
<script src="//dhis2-cdn.org/v219/plugin/table.js"></script>
<script src="//dhis2-cdn.org/v219/plugin/reporttables.js"></script>
<h1 id="reportHeader"><b>DB01_Erongo_1Dem_L2_Disability rates 0-24
years_Census_2011</b></h1>
<h2 id="ou"></h2>
<h2 id="pe"></h2>
<div id="dvReport"></div>
<script>
var orgUnit = dhis2.report.organisationUnit;
var orgUnitHierarchy = dhis2.report.organisationUnitHierarchy;
var orgUnitChildren = dhis2.report.organisationUnitChildren;
var date = dhis2.report.date; // A date in yyyy-MM-dd format<br><br>
var periods = dhis2.report.periods; // An array with period
identifiers<br><br>
var period = periods[0];
//var reportUrl =
"/api/analytics/events/aggregate/rU1vrYCoRBs.html?stage=BmNIrl52sMO&dimension=ou:"
+ orgUnit.id + "&dimension=bSsRJcDBG9T&filter=pe:" + period +
"&displayProperty=NAME";
var reportUrl =
"/api/analytics.xml?dimension=dx:C3KcWZPN5YZ;esQvh8XBqUi;hoAIpggVIaw&dimension=ou:LMGPF478UMN;rgY3dWuhztf&filter=pe:2013&displayProperty=NAME";
Ext.onReady(function() {
$("#ou").append("Org Unit: " + orgUnit.name);
$("#pe").append("Period: " + period);
DHIS.getTable({
"url": "../",
"el": "dvReport",
"dataType": "aggregated_values", // or "individual_records"
"indicators":{
"id" : "JkKAuCwFFM"
},
"columns": [{
"dimension": "ou",
"items": [{
"id": "" + orgUnit.id + "" //"ImspTQPwCqd"
}]
}
});
});
</script>