Control add-in PowerBIManagement
src/System Application/App/ControlAddIns/src/PowerBIManagement.ControlAddin.al178 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------// Copyright (c) Microsoft Corporation. All rights reserved.// Licensed under the MIT License. See License.txt in the project root for license information.// ------------------------------------------------------------------------------------------------namespace System.Integration.PowerBI;controladdin PowerBIManagement{ RequestedHeight = 320; MinimumHeight = 180; VerticalStretch = true; VerticalShrink = true; RequestedWidth = 300; MinimumWidth = 200; HorizontalStretch = true; HorizontalShrink = true; Scripts = 'Resources\PowerBIManagement\js\PowerBIManagement.js', // The powerbi.js file comes from the nuget package: Microsoft.PowerBI.Javascript version: 2.23.1 // https://github.com/microsoft/PowerBI-JavaScript/blob/release_2.23.1/dist/powerbi.js // The file below should point to the nuget package when the AL infrastructure supports it. 'Resources\PowerBIManagement\js\powerbi.js'; StartupScript = 'Resources\PowerBIManagement\js\Startup.js'; StyleSheets = 'Resources\PowerBIManagement\stylesheets\PowerBIManagement.css'; /// <summary> /// Event that will be fired when the AddIn is ready for communication through its API /// </summary> event ControlAddInReady(); /// <summary> /// Event that will be fired when an error occurs in the add-in /// </summary> event ErrorOccurred(Operation: Text; ErrorText: Text); /// <summary> /// Event that will be fired when the page of the embedded report changes /// </summary> event ReportPageChanged(NewPage: Text; NewPageFilters: Text); /// <summary> /// Event that will be fired when the embedded report finishes loading /// </summary> event ReportLoaded(ReportFilters: Text; ActivePageName: Text; ActivePageFilters: Text; CorrelationId: Text); /// <summary> /// Event that will be fired when the embedded dashboard finishes loading /// </summary> event DashboardLoaded(CorrelationId: Text); /// <summary> /// Event that will be fired when the embedded dashboard tile finishes loading /// </summary> event DashboardTileLoaded(CorrelationId: Text); /// <summary> /// Event that will be fired when the embedded report visual finishes loading /// </summary> event ReportVisualLoaded(CorrelationId: Text); /// <summary> /// Initializes the token to be used when embedding Power BI content /// </summary> procedure SetToken(AuthToken: Text); /// <summary> /// Initializes the Power BI embed Report into the page /// </summary> procedure EmbedPowerBIReport(ReportLink: Text; ReportId: Text; PageName: Text); /// <summary> /// Initializes the Power BI embed Dashboard into the page /// </summary> procedure EmbedPowerBIDashboard(DashboardLink: Text; DashboardId: Text); /// <summary> /// Initializes the Power BI embed Dashboard Tile into the page /// </summary> procedure EmbedPowerBIDashboardTile(DashboardTileLink: Text; DashboardId: Text; TileId: Text); /// <summary> /// Initializes the Power BI embed Report Visual into the page /// </summary> procedure EmbedPowerBIReportVisual(ReportVisualLink: Text; ReportId: Text; PageName: Text; VisualName: Text); /// <summary> /// Enters full screen mode for the current embed /// </summary> procedure FullScreen(); /// <summary> /// Updates the report filters with the provided new filters /// </summary> /// <param name="filters">A serialized JSON array of filters</param> /// <remarks> /// The new filters will replace any existing report filter for the same table columns /// </remarks> procedure UpdateReportFilters(Filters: Text); /// <summary> /// Removes the current report level filters /// </summary> procedure RemoveReportFilters(); /// <summary> /// Updates the page filters with the provided new filters /// </summary> /// <param name="filters">A serialized JSON array of filters</param> /// <remarks> /// The new filters will replace any existing page filter for the same table columns /// </remarks> procedure UpdatePageFilters(Filters: Text); /// <summary> /// Removes the current page level filters /// </summary> procedure RemovePageFilters(); /// <summary> /// Changes the active page of the report /// </summary> /// <param name="PageName">The name of the new page to set as active</param> procedure SetPage(PageName: Text); /// <summary> /// Changes the locale used to render the embedded element. If not specified, it will use the default Power BI language. /// </summary> /// <param name="NewLocale">The locale to use, for example "en-us".</param> procedure SetLocale(NewLocale: Text); /// <summary> /// Controls whether the bookmark selection pane will be visible in the embed experience. Defaults to false. /// </summary> /// <param name="Visible">Whether bookmarks should be visible.</param> procedure SetBookmarksVisible(Visible: Boolean); /// <summary> /// Controls whether the filter pane will be visible in the embed experience. Defaults to false. /// </summary> /// <param name="Visible">Whether filters should be visible.</param> procedure SetFiltersVisible(Visible: Boolean); /// <summary> /// Controls whether the page selection bar will be visible in the embed experience. Defaults to false. /// </summary> /// <param name="Visible">Whether page selection should be visible.</param> procedure SetPageSelectionVisible(Visible: Boolean); /// <summary> /// Controls whether the report background should be set to transparent regardless of the actual color. Defaults to false. /// </summary> /// <param name="Visible">Whether the background should be force to transparent.</param> procedure SetTransparentBackground(Transparent: Boolean); /// <summary> /// Controls whether the addin includes a bottom padding that makes it look nicer in some embedded scenarios. Defaults to false. /// </summary> /// <param name="AddPadding">Whether the bottom padding should be added.</param> procedure AddBottomPadding(AddPadding: Boolean);#if not CLEAN26 /// <summary> /// Sets the properties for the embed experience /// </summary> ///<param name="ShowBookmarkSelection">Shows the bookmark selection pane.</param> ///<param name="ShowFilterSelection">Shows the filter pane to filter embed.</param> ///<param name="ShowPageSelection">Shows the pane to select the report page.</param> ///<param name="ShowZoomSelection">Shows the bar that allows manual zoom in and zoom out for the embed.</param> ///<param name="ForceTransparentBackground">Forces a transparent background to the embed.</param> ///<param name="ForceFitToPage">Forces the Fit To Page behaviour for the embed.</param> ///<param name="AddBottomPadding">Controls whether a padding is needed on the bottom of the page (useful in case the embed is the only element displayed on the page).</param> [Obsolete('Use SetBookmarksVisible, SetFiltersVisible, AddBottomPadding, SetTransparentBackground, and SetPageSelectionVisible instead. The other options are no longer supported.', '26.0')] procedure SetSettings(ShowBookmarkSelection: Boolean; ShowFilters: Boolean; ShowPageSelection: Boolean; ShowZoomBar: Boolean; ForceTransparentBackground: Boolean; ForceFitToPage: Boolean; AddBottomPadding: Boolean);#endif}