<?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: Power BI Embed - Page Menu as List View in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/177022#M5739</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&lt;/P&gt;
&lt;P&gt;Check this demo in Chrome.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () {  
var embedConfiguration = {
    type: 'report',
                
    accessToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU', 
                
    embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad',
	settings: {
        filterPaneEnabled: true,
		navContentPaneEnabled: true		
    }	
}; 
 
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

var $pageList = $('#pageList')

report.on('loaded', event =&amp;gt; {
  
// Retrieve the page collection and loop through to collect the 
// page name and display name of each page and display the value.
report.getPages()
    .then(function (pages) {
		var allpages=''
        pages.forEach(function(page) {
             allpages = allpages+'&amp;lt;button type="button" onclick=setPage(\''+page.name+'\')&amp;gt;'  + page.displayName+'&amp;lt;/button&amp;gt;';
			
            
        });
		console.log(allpages);
		$pageList.html(allpages);
    })
    .catch(function (error) {
        console.log(error);
    });

});

}

function setPage(pagename){

// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
 
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
 
// setPage will change the selected view to the page you indicate.
// This is the actual page name not the display name.
report.setPage(pagename)
    .then(function (result) {
        console.log(result);
    })
    .catch(function (errors) {
        console.log(errors);
    });
 
// Report.off removes a given event handler if it exists.
report.off("pageChanged");
 
// Report.on will add an event handler which prints page 
// name and display name to Log window.
report.on("pageChanged", function(event) {
    var page = event.detail.newPage;
    console.log(page.name + " - " + page.displayName);
});
 
}



&amp;lt;/script&amp;gt; 
&amp;lt;div id='pageList'&amp;gt; &amp;lt;/div&amp;gt;

&amp;lt;div id="reportContainer" style="width:1600;height:900" &amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 07:23:14 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-05-17T07:23:14Z</dc:date>
    <item>
      <title>Power BI Embed - Page Menu as List View</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/174938#M5687</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am able t embed the power bi into MVC application.&lt;/P&gt;&lt;P&gt;what i want is , &lt;STRONG&gt;i need to hide the page in the report and provide the list of pages as list view and when user click on the particular page name, then the navigation should happen&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;i disabled the page using the &lt;STRONG&gt;navContentPaneEnabled&lt;/STRONG&gt; as false but now i am stuck with creating menu list view. i searched the github and there is a function available as below, but i am not a expert in MVC or java script&amp;nbsp;&lt;BR /&gt;can someone help me here .&lt;/P&gt;&lt;P&gt;this is the reference code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
 
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
 
// Retrieve the page collection and loop through to collect the 
// page name and display name of each page and display the value.
report.getPages()
    .then(function (pages) {
        pages.forEach(function(page) {
            var log = page.name + " - " + page.displayName;
            Log.logText(log);
        });
    })
    .catch(function (error) {
        Log.log(error);
    });&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 May 2017 18:13:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/174938#M5687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-12T18:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embed - Page Menu as List View</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/177022#M5739</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&lt;/P&gt;
&lt;P&gt;Check this demo in Chrome.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/jquery/dist/jquery.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script src="https://microsoft.github.io/PowerBI-JavaScript/demo/node_modules/powerbi-client/dist/powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () {  
var embedConfiguration = {
    type: 'report',
                
    accessToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXIiOiIwLjIuMCIsIndjbiI6IlBvd2VyQmlBenVyZVNhbXBsZXMiLCJ3aWQiOiJmODFjMTk2Ni1lZGVlLTQxMWItOGY4YS1mODQ0NjAxOWIwNDQiLCJyaWQiOiJjNTJhZjhhYi0wNDY4LTQxNjUtOTJhZi1kYzM5ODU4ZDY2YWQiLCJpc3MiOiJQb3dlckJJU0RLIiwiYXVkIjoiaHR0cHM6Ly9hbmFseXNpcy53aW5kb3dzLm5ldC9wb3dlcmJpL2FwaSIsImV4cCI6MTg5MzQ0ODgwMCwibmJmIjoxNDgxMDM3MTY5fQ.m4SwqmRWA9rJgfl72lEQ_G-Ijpw9Up5YwmBOfXi00YU', 
                
    embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad',
	settings: {
        filterPaneEnabled: true,
		navContentPaneEnabled: true		
    }	
}; 
 
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

var $pageList = $('#pageList')

report.on('loaded', event =&amp;gt; {
  
// Retrieve the page collection and loop through to collect the 
// page name and display name of each page and display the value.
report.getPages()
    .then(function (pages) {
		var allpages=''
        pages.forEach(function(page) {
             allpages = allpages+'&amp;lt;button type="button" onclick=setPage(\''+page.name+'\')&amp;gt;'  + page.displayName+'&amp;lt;/button&amp;gt;';
			
            
        });
		console.log(allpages);
		$pageList.html(allpages);
    })
    .catch(function (error) {
        console.log(error);
    });

});

}

function setPage(pagename){

// Get a reference to the embedded report HTML element
var reportContainer = $('#reportContainer')[0];
 
// Get a reference to the embedded report.
report = powerbi.get(reportContainer);
 
// setPage will change the selected view to the page you indicate.
// This is the actual page name not the display name.
report.setPage(pagename)
    .then(function (result) {
        console.log(result);
    })
    .catch(function (errors) {
        console.log(errors);
    });
 
// Report.off removes a given event handler if it exists.
report.off("pageChanged");
 
// Report.on will add an event handler which prints page 
// name and display name to Log window.
report.on("pageChanged", function(event) {
    var page = event.detail.newPage;
    console.log(page.name + " - " + page.displayName);
});
 
}



&amp;lt;/script&amp;gt; 
&amp;lt;div id='pageList'&amp;gt; &amp;lt;/div&amp;gt;

&amp;lt;div id="reportContainer" style="width:1600;height:900" &amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 07:23:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/177022#M5739</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-05-17T07:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embed - Page Menu as List View</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/177260#M5748</link>
      <description>&lt;P&gt;excellent&amp;nbsp;&lt;/P&gt;&lt;P&gt;much thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="6971" data-lia-user-login="Eric_Zhang" class="lia-mention lia-mention-user"&gt;Eric_Zhang&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 13:33:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embed-Page-Menu-as-List-View/m-p/177260#M5748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T13:33:14Z</dc:date>
    </item>
  </channel>
</rss>

