<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: embed settings in javascriptfile dosent work?? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/embed-settings-in-javascriptfile-dosent-work/m-p/1641909#M27653</link>
    <description>&lt;P&gt;I find af solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// ---- Embed Code ----------------------------------------------------&lt;/P&gt;&lt;P&gt;$(function () {&lt;/P&gt;&lt;P&gt;var models = window["powerbi-client"].models;&lt;BR /&gt;var reportContainer = $("#report-container").get(0);&lt;/P&gt;&lt;P&gt;// Initialize iframe for embedding report&lt;BR /&gt;powerbi.bootstrap(reportContainer, { type: "report" });&lt;/P&gt;&lt;P&gt;$.ajax({&lt;BR /&gt;type: "GET",&lt;BR /&gt;url: "/embedinfo/getembedinfo",&lt;BR /&gt;success: function (data) {&lt;BR /&gt;embedData = $.parseJSON(data);&lt;/P&gt;&lt;P&gt;var models = window["powerbi-client"].models;&lt;/P&gt;&lt;P&gt;// Read embed application token from textbox&lt;BR /&gt;var txtAccessToken = embedData.EmbedToken.Token;&lt;/P&gt;&lt;P&gt;// Read embed URL from textbox&lt;BR /&gt;var txtEmbedUrl = embedData.EmbedReport[0].EmbedUrl;&lt;/P&gt;&lt;P&gt;// Read embed type from radio&lt;BR /&gt;var tokenType = models.TokenType.Embed&lt;/P&gt;&lt;P&gt;// Get models. models contains enums that can be used.&lt;BR /&gt;var models = window['powerbi-client'].models;&lt;/P&gt;&lt;P&gt;// We give All permissions to demonstrate switching between View and Edit mode and saving report.&lt;BR /&gt;var permissions = models.Permissions.All;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Embed configuration used to describe the what and how to embed.&lt;BR /&gt;// This object is used when calling powerbi.embed.&lt;BR /&gt;// This also includes settings and options such as filters.&lt;BR /&gt;// You can find more information at &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const myFilter = {&lt;BR /&gt;$schema: "&lt;A href="http://powerbi.com/product/schema#advanced" target="_blank"&gt;http://powerbi.com/product/schema#advanced&lt;/A&gt;",&lt;BR /&gt;target: {&lt;BR /&gt;table: "myTable",&lt;BR /&gt;column: "myColumn"&lt;BR /&gt;},&lt;BR /&gt;operator: "In",&lt;BR /&gt;values: ["1"]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var config = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;tokenType: tokenType,&lt;BR /&gt;accessToken: txtAccessToken,&lt;BR /&gt;embedUrl: txtEmbedUrl,&lt;BR /&gt;permissions: permissions,&lt;BR /&gt;filters: [myFilter],&lt;BR /&gt;settings: {&lt;BR /&gt;panes: {&lt;BR /&gt;filters: {&lt;BR /&gt;visible: true&lt;BR /&gt;},&lt;BR /&gt;pageNavigation: {&lt;BR /&gt;visible: true&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Get a reference to the embedded report HTML element&lt;BR /&gt;var reportContainer = $("#report-container").get(0);&lt;/P&gt;&lt;P&gt;// Embed the report and display it within the div container.&lt;BR /&gt;var report = powerbi.embed(reportContainer, config);&lt;/P&gt;&lt;P&gt;// Report.off removes a given event handler if it exists.&lt;BR /&gt;report.off("loaded");&lt;/P&gt;&lt;P&gt;// Report.on will add an event handler which prints to Log window.&lt;BR /&gt;report.on("loaded", function () {&lt;BR /&gt;Log.logText("Loaded");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Report.off removes a given event handler if it exists.&lt;BR /&gt;report.off("rendered");&lt;/P&gt;&lt;P&gt;// Report.on will add an event handler which prints to Log window.&lt;BR /&gt;report.on("rendered", function () {&lt;BR /&gt;Log.logText("Rendered");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;report.on("error", function (event) {&lt;BR /&gt;Log.log(event.detail);&lt;/P&gt;&lt;P&gt;report.off("error");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;report.off("saved");&lt;BR /&gt;report.on("saved", function (event) {&lt;BR /&gt;Log.log(event.detail);&lt;BR /&gt;if (event.detail.saveAs) {&lt;BR /&gt;Log.logText('In order to interact with the new report, create a new token and load the new report');&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 13:09:43 GMT</pubDate>
    <dc:creator>andreasalleslev</dc:creator>
    <dc:date>2021-02-03T13:09:43Z</dc:date>
    <item>
      <title>embed settings in javascriptfile dosent work??</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embed-settings-in-javascriptfile-dosent-work/m-p/1641485#M27650</link>
      <description>&lt;P&gt;Hallo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help me. I have embedded a powerbi solution, and it work so fine, but when i try to hide ex the filter pane og apply af filter it dosent work. my javascript file is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$(function () {&lt;BR /&gt;var models = window["powerbi-client"].models;&lt;BR /&gt;var reportContainer = $("#report-container").get(0);&lt;BR /&gt;&lt;BR /&gt;// Initialize iframe for embedding report&lt;BR /&gt;powerbi.bootstrap(reportContainer, { type: "report" });&lt;BR /&gt;&lt;BR /&gt;$.ajax({&lt;BR /&gt;type: "GET",&lt;BR /&gt;url: "/embedinfo/getembedinfo",&lt;BR /&gt;success: function (data) {&lt;BR /&gt;embedData = $.parseJSON(data);&lt;BR /&gt;reportLoadConfig = {&lt;BR /&gt;type: "report",&lt;BR /&gt;tokenType: models.TokenType.Embed,&lt;BR /&gt;accessToken: embedData.EmbedToken.Token,&lt;BR /&gt;// You can embed different reports as per your need&lt;BR /&gt;embedUrl: embedData.EmbedReport[0].EmbedUrl,&lt;BR /&gt;permissions: permissions,&lt;BR /&gt;settings: {&lt;BR /&gt;panes: {&lt;BR /&gt;filters: {&lt;BR /&gt;visible: false&lt;BR /&gt;},&lt;BR /&gt;pageNavigation: {&lt;BR /&gt;visible: false&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i can still se the filterpane and the pagenavigation??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards Andreas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 10:56:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embed-settings-in-javascriptfile-dosent-work/m-p/1641485#M27650</guid>
      <dc:creator>andreasalleslev</dc:creator>
      <dc:date>2021-02-03T10:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: embed settings in javascriptfile dosent work??</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embed-settings-in-javascriptfile-dosent-work/m-p/1641909#M27653</link>
      <description>&lt;P&gt;I find af solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// ---- Embed Code ----------------------------------------------------&lt;/P&gt;&lt;P&gt;$(function () {&lt;/P&gt;&lt;P&gt;var models = window["powerbi-client"].models;&lt;BR /&gt;var reportContainer = $("#report-container").get(0);&lt;/P&gt;&lt;P&gt;// Initialize iframe for embedding report&lt;BR /&gt;powerbi.bootstrap(reportContainer, { type: "report" });&lt;/P&gt;&lt;P&gt;$.ajax({&lt;BR /&gt;type: "GET",&lt;BR /&gt;url: "/embedinfo/getembedinfo",&lt;BR /&gt;success: function (data) {&lt;BR /&gt;embedData = $.parseJSON(data);&lt;/P&gt;&lt;P&gt;var models = window["powerbi-client"].models;&lt;/P&gt;&lt;P&gt;// Read embed application token from textbox&lt;BR /&gt;var txtAccessToken = embedData.EmbedToken.Token;&lt;/P&gt;&lt;P&gt;// Read embed URL from textbox&lt;BR /&gt;var txtEmbedUrl = embedData.EmbedReport[0].EmbedUrl;&lt;/P&gt;&lt;P&gt;// Read embed type from radio&lt;BR /&gt;var tokenType = models.TokenType.Embed&lt;/P&gt;&lt;P&gt;// Get models. models contains enums that can be used.&lt;BR /&gt;var models = window['powerbi-client'].models;&lt;/P&gt;&lt;P&gt;// We give All permissions to demonstrate switching between View and Edit mode and saving report.&lt;BR /&gt;var permissions = models.Permissions.All;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Embed configuration used to describe the what and how to embed.&lt;BR /&gt;// This object is used when calling powerbi.embed.&lt;BR /&gt;// This also includes settings and options such as filters.&lt;BR /&gt;// You can find more information at &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details" target="_blank"&gt;https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const myFilter = {&lt;BR /&gt;$schema: "&lt;A href="http://powerbi.com/product/schema#advanced" target="_blank"&gt;http://powerbi.com/product/schema#advanced&lt;/A&gt;",&lt;BR /&gt;target: {&lt;BR /&gt;table: "myTable",&lt;BR /&gt;column: "myColumn"&lt;BR /&gt;},&lt;BR /&gt;operator: "In",&lt;BR /&gt;values: ["1"]&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var config = {&lt;BR /&gt;type: 'report',&lt;BR /&gt;tokenType: tokenType,&lt;BR /&gt;accessToken: txtAccessToken,&lt;BR /&gt;embedUrl: txtEmbedUrl,&lt;BR /&gt;permissions: permissions,&lt;BR /&gt;filters: [myFilter],&lt;BR /&gt;settings: {&lt;BR /&gt;panes: {&lt;BR /&gt;filters: {&lt;BR /&gt;visible: true&lt;BR /&gt;},&lt;BR /&gt;pageNavigation: {&lt;BR /&gt;visible: true&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Get a reference to the embedded report HTML element&lt;BR /&gt;var reportContainer = $("#report-container").get(0);&lt;/P&gt;&lt;P&gt;// Embed the report and display it within the div container.&lt;BR /&gt;var report = powerbi.embed(reportContainer, config);&lt;/P&gt;&lt;P&gt;// Report.off removes a given event handler if it exists.&lt;BR /&gt;report.off("loaded");&lt;/P&gt;&lt;P&gt;// Report.on will add an event handler which prints to Log window.&lt;BR /&gt;report.on("loaded", function () {&lt;BR /&gt;Log.logText("Loaded");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;// Report.off removes a given event handler if it exists.&lt;BR /&gt;report.off("rendered");&lt;/P&gt;&lt;P&gt;// Report.on will add an event handler which prints to Log window.&lt;BR /&gt;report.on("rendered", function () {&lt;BR /&gt;Log.logText("Rendered");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;report.on("error", function (event) {&lt;BR /&gt;Log.log(event.detail);&lt;/P&gt;&lt;P&gt;report.off("error");&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;report.off("saved");&lt;BR /&gt;report.on("saved", function (event) {&lt;BR /&gt;Log.log(event.detail);&lt;BR /&gt;if (event.detail.saveAs) {&lt;BR /&gt;Log.logText('In order to interact with the new report, create a new token and load the new report');&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:09:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embed-settings-in-javascriptfile-dosent-work/m-p/1641909#M27653</guid>
      <dc:creator>andreasalleslev</dc:creator>
      <dc:date>2021-02-03T13:09:43Z</dc:date>
    </item>
  </channel>
</rss>

