PiEmbedActions. reportEditor

A functional area for interacting with the Report Editor within the embedded pi dashboard. This namespace provides access to functionalities available in the Report Editor.

Methods

(static) open(itemId)

Opens the Report Editor panel for a specific report by sending a post message to the embedded iframe to open the Report Editor UI for the given itemId.

To use open() method, PiEmbedActions needs to be initiated, refer to PiEmbedActions for further information or check the code examples listed below.

Note: The initial call to this method on PiEmbedActions will load the dashboard, while any subsequent calls to open() will avoid reloading the dashboard.

Parameters:
NameTypeDescription
itemIdnumber

The ID of the report to open in the editor.

Example
// 1. Create a dashboard instance, providing a valid iframeId and dashboardUrl.
// dashboardUrl must include a valid host, port, and query parameters.
const dashboard = PiEmbedActions.createDashboard('iframeId', 'https://pi-dev.uk:8224/pi?lang=en_GB&editorDisplayMode=CONTENT');
// 2. Open a specific report in the editor, providing a valid report id.
dashboard.reportEditor.open(2);