<?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 embedded report-filters are not being set in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/embedded-report-filters-are-not-being-set/m-p/997023#M22866</link>
    <description>&lt;P&gt;I've embedded a report into our application. I want to set filters on the report. But I do not succeed.&lt;/P&gt;&lt;P&gt;The application is an Angular 8 application and the scripting language is Typescript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These lines are embedding the report and attempting to setfilters on it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    this.reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById('embedContainer');
    const powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
    powerbi.reset(this.reportContainer);
    const embeddedReport = powerbi.embed(this.reportContainer, this.configuration.getConf()) as Report;

    this.addReportFilters(embeddedReport);
    console.log("filters: ", embeddedReport.getFilters()[0]);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the addReportFilters-function itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  private addReportFilters(pbiReport: Report): void {

    const urlFilter = new ReportPdfUrlFilterModel(EnvironmentUtils.hostnameStartsWithWWWW(), EnvironmentUtils.isEap());

    pbiReport.setFilters(urlFilter.reportFilters).then(
      function () {
        console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!Report filter was set.")
      }
    ).catch(function (errors) {
      console.log("Errors: ", errors );
    });
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Report filter was set."-logstatement is never logged in the console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone see what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Mohammed Y. Hussain&lt;/P&gt;</description>
    <pubDate>Sun, 29 Mar 2020 13:04:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-29T13:04:05Z</dc:date>
    <item>
      <title>embedded report-filters are not being set</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/embedded-report-filters-are-not-being-set/m-p/997023#M22866</link>
      <description>&lt;P&gt;I've embedded a report into our application. I want to set filters on the report. But I do not succeed.&lt;/P&gt;&lt;P&gt;The application is an Angular 8 application and the scripting language is Typescript.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These lines are embedding the report and attempting to setfilters on it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    this.reportContainer = &amp;lt;HTMLElement&amp;gt;document.getElementById('embedContainer');
    const powerbi = new pbi.service.Service(pbi.factories.hpmFactory, pbi.factories.wpmpFactory, pbi.factories.routerFactory);
    powerbi.reset(this.reportContainer);
    const embeddedReport = powerbi.embed(this.reportContainer, this.configuration.getConf()) as Report;

    this.addReportFilters(embeddedReport);
    console.log("filters: ", embeddedReport.getFilters()[0]);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the addReportFilters-function itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  private addReportFilters(pbiReport: Report): void {

    const urlFilter = new ReportPdfUrlFilterModel(EnvironmentUtils.hostnameStartsWithWWWW(), EnvironmentUtils.isEap());

    pbiReport.setFilters(urlFilter.reportFilters).then(
      function () {
        console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!Report filter was set.")
      }
    ).catch(function (errors) {
      console.log("Errors: ", errors );
    });
  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Report filter was set."-logstatement is never logged in the console.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone see what I am doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Mohammed Y. Hussain&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 13:04:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/embedded-report-filters-are-not-being-set/m-p/997023#M22866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-29T13:04:05Z</dc:date>
    </item>
  </channel>
</rss>

