Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shakeel
Regular Visitor

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 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

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@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); 
	  
	  } 
	  
})

View solution in original post

1 REPLY 1
Eric_Zhang
Employee
Employee


@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); 
	  
	  } 
	  
})

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.