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/reloading every 10 seconds or so and I cannot figure out why.  We have  a PBI Premium capacity account and I've looked at every setting possible in app.powerbi.com and on the reports in PBI desktop to no avail.  Can anyone thing of a network or application setting that would cause the reports to keep reloading?  Thanks so much for any help. 

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

5 Replies

    • kcross2000's avatar
      kcross2000
      Regular Visitor

      I do have "Page Refresh" off for both reports.  I've also still yet to find the issue, but I do think it's something in the web app that's causing this reload/refresh behavior.   I know that even in the older version of the web app, if you resize or move a browser window the report would reload.  Is there a way to prevent that behavior some how?  If so, maybe I can give that a try.  

      • Anonymous's avatar
        Anonymous
        Not applicable

        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?