Forum Discussion

kcross2000's avatar
kcross2000
Regular Visitor
6 years ago
Solved

Viewing PowerBI embedded in IFrame and the report keeps refreshing every 5 seconds or so

Hello,   I have an issue where I'm showing a PowerBI report in our custom Angular 8 web application in an IFrame.  This was working fine a couple days ago, but now the reports are refreshing/reload...
  • Anonymous's avatar
    Anonymous
    6 years ago

    I cant confirm that the same would work in an Angular project... but a React project I have worked on, relied on the component hosting the Embedded Report (IFrame) tracking its own state.

    Then, when re-render events occur, the component decides IF the call to embed needs to be made.
    By tracking the current report ID/URL and the state of the embedded object (PreLoad/Loading/Rendered) - I could determine if a reload was required. It sounds as though some external events are causing your component to refresh/re-render - and your code is calling back into the embed function - even though it has already completed and doesn't need to be done again.

    Wiki page for tracking events is here: https://github.com/microsoft/PowerBI-JavaScript/wiki/Handling-Events

    It's difficult to know for sure without seeing the code - but maybe some verbose debugging/console outputs willl help track it down?