Skip to content

Embedding Basic interactions

Amit Shuster edited this page Jan 24, 2021 · 3 revisions
ℹ️ This wiki has been deprecated
All our Client APIs documentation and references can be found in the new Power BI embedded analytics Client APIs documentation set.
For the content of this article see General operations.

Set the size of embedded components

The report will automatically be embedded based on the size of its container. To override the default size of the embeds simply add a CSS class attribute or inline styles for width & height.

Launch an embedded report in fullscreen mode

The code below assumes element with id myReport already contains an embedded report:

var element = document.getElementById('#myReport');
var report = powerbi.get(element);

report.fullscreen();

Print a report

The code below assumes element with id myReport already contains an embedded report:

var element = document.getElementById('#myReport');
var report = powerbi.get(element);

report.print()
  .catch(error => { ... });

Reload a report

The code below assumes element with id myReport already contains an embedded report:

var element = document.getElementById('#myReport');
var report = powerbi.get(element);

report.reload()
  .catch(error => { ... });

Refresh a report

Refresh the underlined data of a report without reset current filters and user interactions. Works only in Direct Query mode. The code below assumes element with id myReport already contains an embedded report:

var element = document.getElementById('#myReport');
var report = powerbi.get(element);

report.refresh()
  .catch(error => { ... });