Scripts in Custom Form not running in Dataset report mode

I have some custom Forms with Scripts to perform a variety of summaries which takes time to achieve with indicators. These scripts are not working in Dataset mode.

Is there something that I have to do to be able to run them in Dataset mode?


Hi @dmaritim,

What kind of problem are you having? Share a little detail. You can check the below example to call any api inside data entry form or can do any calculation:

dhis2.util.on( '', function( event, aLpVgfXiz0f) {

var orgName= $( '#selectedOrganisationUnit' ).val();// From DHIS2 Selection Param
	$.each(jsonResponse, function(key, value){
		var arr = [];
		for(var info in value){
		var level =value[info]['level'];
		if(typeof level != 'undefined'){


You can find more custom scripts here:


All my Scripts are working perfectly in the Dataentry Module. The summaries are done accurately, however, in the Dataset report mode, those summaries disappear even the console.log() outputs. It is like those scripts done run at all.

Check example below:

dhis2.util.on(, function(event, ds) {
console.log(“DataValueLoaded function runned”);

Hi all,

My investigation has taken me through various Scripts in DHIS2. Of interest is the dataSetReport.js especially towards the end where you have the below script. What does this mean?
// Hooks in custom forms - must be present to avoid errors in forms

function onValueSave( fn )
// Do nothing

function onFormLoad( fn )
// Do nothing

Need help.

Hi Members,

Still looking for help in ensuring that JQuery scripts for are running when a dataset is open in dataset report module.

Are there known issues that prevent this event from running in dataet report module?

Your help is highly appreciated.