General operations

Tip

Experiment with APIs in real time using your own report or our sample report in the Developer sandbox section of the Power BI Embedded Analytics Playground.

With Power BI, some operations can be used with all types of embedded components, while others only apply to specific types of embedded components. Full-screen and reload operations apply to all components; print and refresh only apply to reports.

General operations for all components

The following operations apply to report, report visual, dashboard, dashboard tile, paginated report, and Q&A components.

Launch an embedded component in full-screen mode

The following code examples are used to open an embedded component in full-screen mode or to exit full-screen mode.

report.fullscreen();
report.exitFullscreen();

Reload a component

This method reloads the embed and resets the current filters and user interactions, returning the embed back to its original state. For example, in a report this effectively clears all of the new filters originally saved and makes the page the report was saved on as active, resetting a report back to its original state.

await dashboard.reload();

General report operations

The following operations only apply to reports.

This method prints the active page of the report by invoking window.print() on the embed iframe component.

await report.print();

Refresh a report

This method refreshes the underlined data of an embedded component without resetting the current filters or user interactions, and only works in Direct Query mode.

await report.refresh();