Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48350

Re: report.off is not a function

$
0
0

The report.on should work based on my test. Ensure that var report is in the correct context.

 

<html><script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"></script><script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"></script><script type="text/javascript">
window.onload = function () {  

var embedConfiguration = {
    type: 'report',
    accessToken: 'Token',    
	id: 'reportid',
    embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=d99e763f-xxxx' 

}; 
 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
 
report.on('loaded', function() {
console.log('report.on - loaded');
});

}
</script><div id="reportContainer" powerbi-settings-nav-content-pane-enabled="true"   powerbi-settings-filter-pane-enabled="true"></div></html>

 

 

Capture.PNG 


Viewing all articles
Browse latest Browse all 48350

Trending Articles