Forum Discussion

Shakeel's avatar
Shakeel
Regular Visitor
8 years ago
Solved

How to Get Newly Generated Report Id in Power BI Embedded Javascript

I've created Integration application with Power BI Embedded Javascript with ASP.Net   I've also achieved Create New Report option using Power BI Javascript.  It's gives me option to save as and it...
  • Eric_Zhang's avatar
    8 years ago

    Shakeel wrote:

    I've created Integration application with Power BI Embedded Javascript with ASP.Net

     

    I've also achieved Create New Report option using Power BI Javascript. 

    It's gives me option to save as and it also work fine. But I need to get in return of save as report of it's newly generated Report Id.

     

    How I can get newly created report's report id in javascript when I fire Save as command.

    Please let me know


    Shakeel

    You can get the SavedAs report's ID from the event listener. The reportObjectId is the reportid.

    report.on("saved", function(event) {
    	  
    	  if(event.detail.saveAs){
    	   
    	   console.log(event.detail.reportObjectId); 
    	  
    	  } 
    	  
    })