<?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: Custom visual open new report in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132835#M4573</link>
    <description>&lt;P&gt;I am able to display&amp;nbsp;hyperlink with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'&amp;lt;a onclick=parent.postMessage("childframe","*");&amp;gt; '+ click here +' &amp;lt;/a&amp;gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when i click on 'click here' it doesn't transfer the message even if the event is reached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;window.addEventListener("message", function (event) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;console.log(event.data); //display data but not the parameter&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'&amp;lt;a onclick=window.postMessage("childframe","*");&amp;gt; '+ task.typeDate.type+' &amp;lt;/a&amp;gt;'&lt;/PRE&gt;&lt;P&gt;And this code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Create IE + others compatible event handler
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
var eventer = window[eventMethod];
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";

// Listen to message from child window
eventer(messageEvent, function (e) {
    console.log('parent received message!:  ', e.data);
}, false);&lt;/PRE&gt;&lt;P&gt;I can see my parameter but the origin source is unknwon so it is not safe at all&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2017 14:25:55 GMT</pubDate>
    <dc:creator>amassip</dc:creator>
    <dc:date>2017-02-24T14:25:55Z</dc:date>
    <item>
      <title>Custom visual open new report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132011#M4526</link>
      <description>&lt;P&gt;Hello everybody&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know if it is possible to open a new powerBI report when the user clicked on a custom visual ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var elements = document.getElementsByClassName("class");
			for(var x=0; x&amp;lt;elements.length; x++)
			{
			  elements[x].addEventListener("click", function(e) {
				window.top.location.href = url;
			  });
			} &lt;/PRE&gt;&lt;P&gt;I got the following error :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refused to display '&lt;A href="https://myurl.com/'&amp;nbsp;in" target="_blank"&gt;https://myurl.com/'&amp;nbsp;in&lt;/A&gt; a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I know the header depends of the owner but I wonder if I missed something else ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&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;</description>
      <pubDate>Thu, 23 Feb 2017 09:38:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132011#M4526</guid>
      <dc:creator>amassip</dc:creator>
      <dc:date>2017-02-23T09:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual open new report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132761#M4563</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/16923"&gt;@amassip&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I do not find an available way. You may submit an idea.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 10:52:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132761#M4563</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-02-24T10:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual open new report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132835#M4573</link>
      <description>&lt;P&gt;I am able to display&amp;nbsp;hyperlink with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;'&amp;lt;a onclick=parent.postMessage("childframe","*");&amp;gt; '+ click here +' &amp;lt;/a&amp;gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when i click on 'click here' it doesn't transfer the message even if the event is reached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;window.addEventListener("message", function (event) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;console.log(event.data); //display data but not the parameter&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'&amp;lt;a onclick=window.postMessage("childframe","*");&amp;gt; '+ task.typeDate.type+' &amp;lt;/a&amp;gt;'&lt;/PRE&gt;&lt;P&gt;And this code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// Create IE + others compatible event handler
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
var eventer = window[eventMethod];
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";

// Listen to message from child window
eventer(messageEvent, function (e) {
    console.log('parent received message!:  ', e.data);
}, false);&lt;/PRE&gt;&lt;P&gt;I can see my parameter but the origin source is unknwon so it is not safe at all&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 14:25:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/132835#M4573</guid>
      <dc:creator>amassip</dc:creator>
      <dc:date>2017-02-24T14:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual open new report</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/136099#M4684</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/16923"&gt;@amassip&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also reach out for help&amp;nbsp;on GitHub and&amp;nbsp;keep an eye on&amp;nbsp;&lt;A title="" href="https://powerbi.microsoft.com/en-us/blog/tag/custom-visuals/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer noopener noreferrer"&gt;Custom Visuals&amp;nbsp;blog&lt;/A&gt; for the latest info.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 02:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-open-new-report/m-p/136099#M4684</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-03-03T02:44:49Z</dc:date>
    </item>
  </channel>
</rss>

