akshay5995 / powerbi-report-component

Easily embed your Microsoft PowerBI Report, Dashbord or Tile in your React App
http://akshay5995.github.io/powerbi-report-component
MIT License
55 stars 30 forks source link

[BUG] Event gets triggered only for the last embedded report #175

Closed rachitharlalka closed 4 years ago

rachitharlalka commented 4 years ago

I have embedded multiple reports in the same page which all have some events. But the event get triggered only for the last added report and not for all. Please help.

akshay5995 commented 4 years ago

The report internally uses powerbi global object. I think that would mean their Microsoft's core lib implementation is binded only to the last embedded report. Let me look into it and give more details. Is there a reason that your using multiple reports ?

Multiple iframes and Js load time would be end up being really bad user experience and pref hit would be so much!

akshay5995 commented 4 years ago

Hi, I found a similar issue on stackoverflow. So, I fixed your issue. Can you try and check with new package version 1.7.2 ?

rachitharlalka commented 4 years ago

Thank you Akshay for the quick help. The reason behind using multiple report is to embed tiles based on user role.

akshay5995 commented 4 years ago

Oh okay, Can you test it on your end? And re-open if not fixed.

rachitharlalka commented 4 years ago

I was testing this only. It's working fine but not sure why i am getting too many errors in console.

ERROR Error: Uncaught (in promise): Esri is not supported in Embedded scenario. ERROR Error: Uncaught (in promise): Error ERROR TypeError: Cannot read property 'reject' of undefined All errors are related to dashboardEmbed.min.js

embed-errors
akshay5995 commented 4 years ago

@rachitharlalka It's error thrown by the powerbi js lib by Microsoft. You can see it in stacktrace dashboardEmbed.min.js. Please try debugging or stackoverflow for this. It's not an issue with this Are you trying to embed a tile or dashboard?

akshay5995 commented 4 years ago

Please feel free to email me directly. I'll see if I can help you out.

rachitharlalka commented 4 years ago

Sure. Thank you for the help. I am trying to embed tile and report. But because tile option is not available, so embedded dashboard with single tile.