Opening a canned report or report ce as a drill down report using JS script

Hello Helica Team,

I am using helical insight enterprise edition 4.1 GA. Is it possible to implement drill down from the adhoc report to another report CE or a canned report?

Thank You,
Netta.

Hello Netta,

  1. On the parent report (let us say it’s a pie chart) apply below script
  2. Whenever user clicks on slice , the clicked value gets passed to the child report url as a parameter
  3. Open report in edit mode and inject below script and provide child report URL
    NOTE: In the code you have to pass the exact report url of the canned report / report ce which should get passed. Also mention the name of the filter which is present in the child report (like in below code
    Filter mentioned is as TRUCK_TYPE). So accordingly make the changed
hi_container.set("preExecution",function(c){
		  var viz_Options = c.get("viz_Options");
		  viz_Options.chartOptions.data = {
			  onclick: function(d) {
				// console.log(d.name);
				reportRender({movement_type:d.name});
			  }
		  };
		  c.set("viz_Options",viz_Options);
});

function reportRender(filters) {
    window.open(window.DashboardGlobals.baseUrl+"hi.html?dir=1638269199312/1638416237748&file=4bc57cb6-5ada-4376-bcd7-b42aa27f7214.efw&mode=dashboard&TRUCK_TYPE="+filters.movement_type,"_blank");
}

Thank You,
Helical Insight.