<?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 Some API functions don't work using TypeScipt in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/302661#M8922</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to embed report using TypeScript:&lt;/P&gt;&lt;PRE&gt;import * as pbi from 'powerbi-client';

let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
let report = powerbi.embed(reportContainer, config);&lt;/PRE&gt;&lt;P&gt;This works fine but I want to set or get filters:&lt;/P&gt;&lt;PRE&gt;report.getFilters();&lt;/PRE&gt;&lt;P&gt;And I am getting an error "Property 'getFilters' does not exist on type 'Embed'". It works well in JavaScript. Any ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 06:40:45 GMT</pubDate>
    <dc:creator>andriikubrak</dc:creator>
    <dc:date>2017-11-15T06:40:45Z</dc:date>
    <item>
      <title>Some API functions don't work using TypeScipt</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/302661#M8922</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to embed report using TypeScript:&lt;/P&gt;&lt;PRE&gt;import * as pbi from 'powerbi-client';

let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
let report = powerbi.embed(reportContainer, config);&lt;/PRE&gt;&lt;P&gt;This works fine but I want to set or get filters:&lt;/P&gt;&lt;PRE&gt;report.getFilters();&lt;/PRE&gt;&lt;P&gt;And I am getting an error "Property 'getFilters' does not exist on type 'Embed'". It works well in JavaScript. Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 06:40:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/302661#M8922</guid>
      <dc:creator>andriikubrak</dc:creator>
      <dc:date>2017-11-15T06:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Some API functions doesn't work using TypeScipt</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/303453#M8939</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/43553"&gt;@andriikubrak&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to embed report using TypeScript:&lt;/P&gt;
&lt;PRE&gt;import * as pbi from 'powerbi-client';

let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
let report = powerbi.embed(reportContainer, config);&lt;/PRE&gt;
&lt;P&gt;This works fine but I want to set or get filters:&lt;/P&gt;
&lt;PRE&gt;report.getFilters();&lt;/PRE&gt;
&lt;P&gt;And I am getting an error "Property 'getFilters' does not exist on type 'Embed'". It works well in JavaScript. Any ideas?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/43553"&gt;@andriikubrak&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks for your reporting. I've submitted &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/issues/286" target="_self"&gt;an issue&lt;/A&gt; in the Power BI Javascript git&amp;nbsp;lib. We may need more information from you to reproduce the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 06:12:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/303453#M8939</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-11-15T06:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Some API functions doesn't work using TypeScipt</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/459319#M14144</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same issue with typescript and Angular 2+. Any response back on this? I installed the powerbi-client Javascript module and am getting the same thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import * as pbi from 'powerbi-client';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById("reportSdkEmbedded");&lt;BR /&gt;// Embed the report and display it within the div container. Should be injected as a service properly&lt;BR /&gt;let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);&lt;BR /&gt;let report= powerbi.embed(reportContainer, config);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Visual Studio 2017 with Intellisense, typing "report." doesn't offer you any options for .getFilters(), .setFilters(), .settings, etc. What's going on?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 02:59:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/459319#M14144</guid>
      <dc:creator>sdaviesnz</dc:creator>
      <dc:date>2018-07-11T02:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Some API functions doesn't work using TypeScipt</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/459359#M14148</link>
      <description>&lt;P&gt;Just to add further, I've done some research and it looks like there are problems with the Typescript typings for the PowerBI-Javascript node package. It seems like it's good with Javascript/JQuery but not so much Typescript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get something going like this (notice, I'm not using the "embed" command):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let report2 = new pbi.Report(powerbi, reportContainer, config);&lt;BR /&gt;report2.getFilters()&lt;BR /&gt;&amp;nbsp; .then(filters =&amp;gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; // ...&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 04:03:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/459359#M14148</guid>
      <dc:creator>sdaviesnz</dc:creator>
      <dc:date>2018-07-11T04:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Some API functions doesn't work using TypeScipt</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/460459#M14173</link>
      <description>&lt;P&gt;If anyone's still stuck on getting PowerBI-Javascript to work in Typescript, here's the hint that got it going for me.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;in Typescript/Angular, you have to refer to the Report model, not the Embed model as in the Javascript examples&lt;/LI&gt;&lt;LI&gt;when you refer to your report container div, make sure it's as an&amp;nbsp;&lt;SPAN&gt;&amp;lt;HTMLElement&amp;gt;, e.g&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;let reportContainer =&lt;FONT size="2"&gt;&amp;lt;HTMLElement&amp;gt;document.getElementById("reportSdkEmbedded");&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;when you call p&lt;SPAN&gt;owerbi.embed(..), make it&amp;nbsp;&amp;lt;pbi.Report&amp;gt;powerbi.embed(...) instead&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pasting my example below to call report.getFilters&lt;/P&gt;&lt;P&gt;(note, I have an Angular component variable:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;report: pbi.Report;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;let reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById("reportSdkEmbedded");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;let powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;this.report = &amp;lt;pbi.Report&amp;gt;powerbi.embed(reportContainer, config);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;this.report.on("loaded",&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;() =&amp;gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; this.report.getFilters()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .then(allTargetFilters =&amp;gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log("allTargetFilters:");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(allTargetFilters);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;});&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more info, see the answers here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Angular-2-and-Power-BI-Embedded/td-p/112226" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Angular-2-and-Power-BI-Embedded/td-p/112226&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2018 03:29:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Some-API-functions-don-t-work-using-TypeScipt/m-p/460459#M14173</guid>
      <dc:creator>sdaviesnz</dc:creator>
      <dc:date>2018-07-12T03:29:11Z</dc:date>
    </item>
  </channel>
</rss>

