Skip to content

Embedding Basic interactions

Amit Shuster edited this page May 13, 2020 · 3 revisions

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 => { ... });