diff --git a/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js b/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js
index 06a3e840aa..a065af9aa5 100644
--- a/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js
+++ b/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js
@@ -16,9 +16,8 @@ var pbiAuthToken = null;
var _showBookmarkSelection = false;
var _showFilters = false;
var _showPageSelection = false;
-var _showZoomBar = false;
+var _showZoomBar = true;
var _forceTransparentBackground = false;
-var _forceFitToPage = false;
var _addBottomPadding = false;
var _localeSettings = {};
@@ -147,6 +146,16 @@ function InitializeFrame(fullpage, ratio) {
}
}
+function SetSettings(showBookmarkSelection, showFilters, showPageSelection, showZoomBar, forceTransparentBackground, forceFitToPage, addBottomPadding) {
+ // OBSOLETE
+ _showBookmarkSelection = showBookmarkSelection;
+ _showFilters = showFilters;
+ _showPageSelection = showPageSelection;
+ _showZoomBar = showZoomBar;
+ _forceTransparentBackground = forceTransparentBackground;
+ _addBottomPadding = addBottomPadding;
+}
+
// Exposed Functions
function EmbedPowerBIReport(reportLink, reportId, pageName) {
@@ -345,14 +354,24 @@ function SetToken(authToken) {
pbiAuthToken = authToken;
}
-function SetSettings(showBookmarkSelection, showFilters, showPageSelection, showZoomBar, forceTransparentBackground, forceFitToPage, addBottomPadding) {
- _showBookmarkSelection = showBookmarkSelection;
- _showFilters = showFilters;
- _showPageSelection = showPageSelection;
- _showZoomBar = showZoomBar;
- _forceTransparentBackground = forceTransparentBackground;
- _forceFitToPage = forceFitToPage;
- _addBottomPadding = addBottomPadding;
+function SetBookmarksVisible(visible) {
+ _showBookmarkSelection = visible;
+}
+
+function SetFiltersVisible(visible) {
+ _showFilters = visible;
+}
+
+function SetPageSelectionVisible(visible) {
+ _showPageSelection = visible;
+}
+
+function SetTransparentBackground(transparent) {
+ _forceTransparentBackground = transparent;
+}
+
+function AddBottomPadding(addPadding) {
+ _addBottomPadding = addPadding;
}
// Internal functions
@@ -411,13 +430,6 @@ function CompileSettings() {
settingsObject.background = models.BackgroundType.Transparent;
}
- if (_forceFitToPage) {
- settingsObject.layoutType = models.LayoutType.Custom;
- settingsObject.customLayout = {
- displayOption: models.DisplayOption.FitToPage
- }
- }
-
return settingsObject;
}
@@ -504,14 +516,18 @@ function LogErrorToConsole(operation, error) {
}
function GetErrorMessage(error) {
- if (error && error.message) {
- return error.message;
+ if (error && error.detail && error.detail.detailedMessage) {
+ return error.detail.detailedMessage;
}
if (error && error.detail && error.detail.message) {
return error.detail.message;
}
+ if (error && error.message) {
+ return error.message;
+ }
+
return error.toString();
}
diff --git a/src/System Application/App/ControlAddIns/src/PowerBIManagement.ControlAddin.al b/src/System Application/App/ControlAddIns/src/PowerBIManagement.ControlAddin.al
index 0aa30926ce..47da51ef28 100644
--- a/src/System Application/App/ControlAddIns/src/PowerBIManagement.ControlAddin.al
+++ b/src/System Application/App/ControlAddIns/src/PowerBIManagement.ControlAddin.al
@@ -130,6 +130,37 @@ controladdin PowerBIManagement
/// The locale to use, for example "en-us".
procedure SetLocale(NewLocale: Text);
+ ///
+ /// Controls whether the bookmark selection pane will be visible in the embed experience. Defaults to false.
+ ///
+ /// Whether bookmarks should be visible.
+ procedure SetBookmarksVisible(Visible: Boolean);
+
+ ///
+ /// Controls whether the filter pane will be visible in the embed experience. Defaults to false.
+ ///
+ /// Whether filters should be visible.
+ procedure SetFiltersVisible(Visible: Boolean);
+
+ ///
+ /// Controls whether the page selection bar will be visible in the embed experience. Defaults to false.
+ ///
+ /// Whether page selection should be visible.
+ procedure SetPageSelectionVisible(Visible: Boolean);
+
+ ///
+ /// Controls whether the report background should be set to transparent regardless of the actual color. Defaults to false.
+ ///
+ /// Whether the background should be force to transparent.
+ procedure SetTransparentBackground(Transparent: Boolean);
+
+ ///
+ /// Controls whether the addin includes a bottom padding that makes it look nicer in some embedded scenarios. Defaults to false.
+ ///
+ /// Whether the bottom padding should be added.
+ procedure AddBottomPadding(AddPadding: Boolean);
+
+#if not CLEAN26
///
/// Sets the properties for the embed experience
///
@@ -140,7 +171,9 @@ controladdin PowerBIManagement
///Forces a transparent background to the embed.
///Forces the Fit To Page behaviour for the embed.
///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).
+ [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
#if not CLEAN25
///
diff --git a/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js b/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js
index 06a3e840aa..a065af9aa5 100644
--- a/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js
+++ b/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js
@@ -16,9 +16,8 @@ var pbiAuthToken = null;
var _showBookmarkSelection = false;
var _showFilters = false;
var _showPageSelection = false;
-var _showZoomBar = false;
+var _showZoomBar = true;
var _forceTransparentBackground = false;
-var _forceFitToPage = false;
var _addBottomPadding = false;
var _localeSettings = {};
@@ -147,6 +146,16 @@ function InitializeFrame(fullpage, ratio) {
}
}
+function SetSettings(showBookmarkSelection, showFilters, showPageSelection, showZoomBar, forceTransparentBackground, forceFitToPage, addBottomPadding) {
+ // OBSOLETE
+ _showBookmarkSelection = showBookmarkSelection;
+ _showFilters = showFilters;
+ _showPageSelection = showPageSelection;
+ _showZoomBar = showZoomBar;
+ _forceTransparentBackground = forceTransparentBackground;
+ _addBottomPadding = addBottomPadding;
+}
+
// Exposed Functions
function EmbedPowerBIReport(reportLink, reportId, pageName) {
@@ -345,14 +354,24 @@ function SetToken(authToken) {
pbiAuthToken = authToken;
}
-function SetSettings(showBookmarkSelection, showFilters, showPageSelection, showZoomBar, forceTransparentBackground, forceFitToPage, addBottomPadding) {
- _showBookmarkSelection = showBookmarkSelection;
- _showFilters = showFilters;
- _showPageSelection = showPageSelection;
- _showZoomBar = showZoomBar;
- _forceTransparentBackground = forceTransparentBackground;
- _forceFitToPage = forceFitToPage;
- _addBottomPadding = addBottomPadding;
+function SetBookmarksVisible(visible) {
+ _showBookmarkSelection = visible;
+}
+
+function SetFiltersVisible(visible) {
+ _showFilters = visible;
+}
+
+function SetPageSelectionVisible(visible) {
+ _showPageSelection = visible;
+}
+
+function SetTransparentBackground(transparent) {
+ _forceTransparentBackground = transparent;
+}
+
+function AddBottomPadding(addPadding) {
+ _addBottomPadding = addPadding;
}
// Internal functions
@@ -411,13 +430,6 @@ function CompileSettings() {
settingsObject.background = models.BackgroundType.Transparent;
}
- if (_forceFitToPage) {
- settingsObject.layoutType = models.LayoutType.Custom;
- settingsObject.customLayout = {
- displayOption: models.DisplayOption.FitToPage
- }
- }
-
return settingsObject;
}
@@ -504,14 +516,18 @@ function LogErrorToConsole(operation, error) {
}
function GetErrorMessage(error) {
- if (error && error.message) {
- return error.message;
+ if (error && error.detail && error.detail.detailedMessage) {
+ return error.detail.detailedMessage;
}
if (error && error.detail && error.detail.message) {
return error.detail.message;
}
+ if (error && error.message) {
+ return error.message;
+ }
+
return error.toString();
}