<?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: dashboard embed html iframe not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80399#M2842</link>
    <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/11389"&gt;@v-chuncz-msft﻿&lt;/a&gt;: Can we upload .pbix files using Power BI Rest API?&lt;/P&gt;&lt;P&gt;Do we have any way to provide access to uploaded reports?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2016 10:50:29 GMT</pubDate>
    <dc:creator>Sunkari</dc:creator>
    <dc:date>2016-10-20T10:50:29Z</dc:date>
    <item>
      <title>dashboard embed html iframe not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/79775#M2818</link>
      <description>&lt;P&gt;I have project embede &amp;nbsp;power bi dashboard but i embed after he doesn't working&lt;/P&gt;&lt;P&gt;when i check the console he show the error massage&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;VM894 powerbiportal.dependencies.bundle.min.js:130 ReferenceError: powerBIAccessToken is not defined
    at r.setAuthorizationHeader (VM897 powerbiportal.common.bundle.min.js:40)
    at r.powerbiRequestOptions (VM897 powerbiportal.common.bundle.min.js:40)
    at i.Object.defineProperty.get [as requestOptions] (VM897 powerbiportal.common.bundle.min.js:37)
    at i.n.sendLongPollRequest (VM897 powerbiportal.common.bundle.min.js:37)
    at VM897 powerbiportal.common.bundle.min.js:37
    at VM894 powerbiportal.dependencies.bundle.min.js:170
    at e (VM894 powerbiportal.dependencies.bundle.min.js:59)
    at VM894 powerbiportal.dependencies.bundle.min.js:62&lt;/PRE&gt;&lt;P&gt;My powerbi embed dashboard code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;著是demo
&amp;lt;?php
include('powerbi.php');//匯入我自訂的powerbi libery
$powerbi =  new powerbi();
$report = $powerbi-&amp;gt;report();
$report  = json_decode($report);
$reportvalue = $report-&amp;gt;value;
$access = $powerbi-&amp;gt;token();
$token_type = $access-&amp;gt;token_type;
$token = $access-&amp;gt;access_token;
$dashbord = $powerbi-&amp;gt;dashbord();
$dashbord = json_decode($dashbord);
$dashbord_value = $dashbord-&amp;gt;value;
//$workspace =  $powerbi-&amp;gt;workspace();
?&amp;gt;
&amp;lt;input type="button" value="報告  &amp;amp;#10; report" onclick="report()"&amp;gt;
&amp;lt;input type="button" value="儀錶  &amp;amp;#10; dashbord" onclick="dashbord()"&amp;gt;

            &amp;lt;iframe ID="iFrameEmbedReport" height="500px" width="900px"&amp;gt;&amp;lt;/iframe&amp;gt;
			&amp;lt;input type='hidden' value="&amp;lt;?=$token?&amp;gt;" id="MainContent_accessToken"&amp;gt;
			&amp;lt;input type="hidden" value="&amp;lt;?=$reportvalue[0]-&amp;gt;embedUrl?&amp;gt;" id="MainContent_ReportEmbedUrl"&amp;gt;
			&amp;lt;input type="hidden" value="&amp;lt;?=$dashbord_value[0]-&amp;gt;embedUrl?&amp;gt;" id="DashbordUrl"&amp;gt;
			

&amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
        //This code is for sample purposes only.

        //Configure IFrame for the Report after you have an Access Token. See Default.aspx.cs to learn how to get an Access Token
		function report(){
			
            if ("" != document.getElementById('MainContent_accessToken').value)
            {
                var iframe = document.getElementById('iFrameEmbedReport');

                // To load a Report do the following:
                // Set the IFrame source to the EmbedUrl from the Get Reports operation
                iframe.src=document.getElementById('MainContent_ReportEmbedUrl').value;

                // Add an onload handler to submit the access token
                iframe.onload = postActionLoadReport;
            }
       
		}
        function dashbord(){
			if ("" != document.getElementById('MainContent_accessToken').value)
            {
                var iframe = document.getElementById('iFrameEmbedReport');
				iframe.src=document.getElementById('DashbordUrl').value + "&amp;amp;width=800&amp;amp;height=500";
				iframe.onload = postdashborad;

              
                

                // Add an onload handler to submit the access token
               
            }
		} 
        // Post the access token to the IFrame
        function postActionLoadReport() {

            // Construct the push message structure
            // this structure also supports setting the reportId, groupId, height, and width.
            // when using a report in a group, you must provide the groupId on the iFrame SRC
            var m = {
                action: "loadReport",
                accessToken: document.getElementById('MainContent_accessToken').value
            };
            message = JSON.stringify(m);

            // push the message.
            iframe = document.getElementById('iFrameEmbedReport');
            iframe.contentWindow.postMessage(message, "*");;
        }
        function postdashborad(){
			
			
			var m = {   action: "loadTile" , accessToken: "&amp;lt;?=$token?&amp;gt;", height: 500 , width: 722 };
			message = JSON.stringify(m);  
			iframe = document.getElementById('iFrameEmbedReport'); iframe.contentWindow.postMessage(message, "*");
			
		}
		

    &amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;I search many place everywhere&amp;nbsp;said powerbi dashborad not support is really ? Is it cause my code the working result ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to fix this porblem ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only my report can working is very strange why it&amp;nbsp;always say not find accesstoken but i have give him&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 05:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/79775#M2818</guid>
      <dc:creator>bright</dc:creator>
      <dc:date>2016-10-19T05:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard embed html iframe not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80332#M2834</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/15542"&gt;@bright﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I do not find an available way to embed a dashboard. The Power BI REST API for dashboard operations is still a preview version. You may submit an &lt;A href="https://ideas.powerbi.com/forums/265200-power-bi" target="_self"&gt;idea&lt;/A&gt;&amp;nbsp;or leave a comment at &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript" target="_self"&gt;GitHub&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 09:26:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80332#M2834</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2016-10-20T09:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard embed html iframe not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80399#M2842</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/11389"&gt;@v-chuncz-msft﻿&lt;/a&gt;: Can we upload .pbix files using Power BI Rest API?&lt;/P&gt;&lt;P&gt;Do we have any way to provide access to uploaded reports?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 10:50:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80399#M2842</guid>
      <dc:creator>Sunkari</dc:creator>
      <dc:date>2016-10-20T10:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard embed html iframe not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80738#M2849</link>
      <description>&lt;P&gt;I &lt;SPAN class="st"&gt;wrote&amp;nbsp;&lt;/SPAN&gt;my i idea who can vot this &lt;A href="https://ideas.powerbi.com/forums/268152-developer-apis/suggestions/16721101-powerbi-dashboard-can-embed-html-ifarme#comments" target="_self"&gt;idea&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2016 03:23:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dashboard-embed-html-iframe-not-working/m-p/80738#M2849</guid>
      <dc:creator>bright</dc:creator>
      <dc:date>2016-10-21T03:23:21Z</dc:date>
    </item>
  </channel>
</rss>

