{"action":"opened","issue":{"url":"https://api.github.com/repos/taarskog/crm-powerbi-viewer/issues/45","repository_url":"https://api.github.com/repos/taarskog/crm-powerbi-viewer","labels_url":"https://api.github.com/repos/taarskog/crm-powerbi-viewer/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/taarskog/crm-powerbi-viewer/issues/45/comments","events_url":"https://api.github.com/repos/taarskog/crm-powerbi-viewer/issues/45/events","html_url":"https://github.com/taarskog/crm-powerbi-viewer/issues/45","id":375087214,"node_id":"MDU6SXNzdWUzNzUwODcyMTQ=","number":45,"title":"Report on dashboard not filtering","user":{"login":"NunezJr","id":39093663,"node_id":"MDQ6VXNlcjM5MDkzNjYz","avatar_url":"https://avatars2.githubusercontent.com/u/39093663?v=4","gravatar_id":"","url":"https://api.github.com/users/NunezJr","html_url":"https://github.com/NunezJr","followers_url":"https://api.github.com/users/NunezJr/followers","following_url":"https://api.github.com/users/NunezJr/following{/other_user}","gists_url":"https://api.github.com/users/NunezJr/gists{/gist_id}","starred_url":"https://api.github.com/users/NunezJr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NunezJr/subscriptions","organizations_url":"https://api.github.com/users/NunezJr/orgs","repos_url":"https://api.github.com/users/NunezJr/repos","events_url":"https://api.github.com/users/NunezJr/events{/privacy}","received_events_url":"https://api.github.com/users/NunezJr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-29T15:55:02Z","updated_at":"2018-10-29T15:55:02Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nI've embedded a report onto a system dashboard and expected to be able to filter the same as it is done on the different forms(accounts, opportunity, etc). However the report is not filtering. Developer tools is no help either because the script is never called. I'm using a treemap visual on the report.\r\n\r\n**Screenshots**\r\n````\r\nSamples.Filters.filterUser = function (report) {\r\n    debugger;\r\n    report.on(\"pageChanged\", function (event) {\r\n        let page = event.detail.newPage;\r\n        console.log(`Page changed to '${page.displayName}' (${page.name})`);\r\n\r\n        if (page.displayName === \"Page 1\") {\r\n            var user = window.parent.Xrm.Page.context.getUserId();\r\n            user = user.replace('{', '').replace('}', '');\r\n            const filter = {\r\n                $schema: \"http://powerbi.com/product/schema#basic\",\r\n                target: {\r\n                    table: \"Teams\",\r\n                    column: \"_administratorid_value\"\r\n                },\r\n                operator: \"In\",\r\n                values: [user]\r\n            };\r\n\r\n            page.setFilters([filter]);\r\n        }\r\n    });\r\n}`\r\n```\r\n\r\n**Environment (please complete the following information):**\r\n - Online]\r\n - Chrome\r\n - D365CE version 9.0.2\r\n - 1.1\r\n - Are you able to log directly into [Power BI](https://app.powerbi.com) and see your report/dashboard? Yes\r\n\r\n**Additional context**\r\nDebugger does not work, the script is not called. All other filters used on forms work."}}
{"actor":{"display_login":"NunezJr"}}