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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reload Embedded Report

Hi

I have a report embedded with javascript

In a certain case I have to completely reload the same report

To do this I use the Reload function as follows

report.reload();                         
var embedContainer = $pbiContainer[0];
powerbi.reset(embedContainer);
report = powerbi.embedNew(embedContainer, config);
report = powerbi.load(embedContainer, config);

 After this everything is fine and the report is loaded

However, if I try to change the report page as follows

config.pageName = "xxxx";
report.render(config);                         
await report.refresh();

I get the following error : Invalid operation - prepare report required prior to render

and the page is not changed

If I change the page, with the same code, before Reload, I have no problems

 

What can I do ?

Thanks in advance

Status: Investigating
Comments
Anonymous
Not applicable

Hi @DavideBono97 ,

 

As the error shows, it should be necessary to change the page and then reload to avoid error, otherwisw the correct page cannot be confirmed.

 

Best regards,

Community Support Team Selina zhu