taarskog / crm-powerbi-viewer

Embed tiles and reports from Power BI into Dynamics CRM Forms and Dashboards.
http://crm-powerbi-viewer.heiigjen.com/
MIT License
27 stars 10 forks source link

DOMException: Failed to execute 'postMessage' on 'Window' on report.applyTheme #67

Closed evanbarke closed 4 years ago

evanbarke commented 4 years ago

Good day!

I am trying to build in a day/night switch into my Power BI Embedded app that will flip from dark to light. I want to extend the functionality into the embedded report itself.

Here is the code:

` var report = powerbi.embed(reportContainer, config); $.ajaxSetup({ async: false }); var themeJson= (theme == "material") ? $.getJSON("Content/power-bi-themes/light.json") : $.getJSON("Content/power-bi-themes/dark.json"); $.ajaxSetup({ async: true });

                        report.applyTheme({themeJson:themeJson});`

The error I am getting is in the subject line. Please help! :)

taarskog commented 4 years ago

Hi.

This is not related to crm-powerbi-viewer so posting here is not the right place to get answers on using the PowerBI-JavaScript library. Even so I've would have tried to help you, but do not have capacity to look into this before Christmas Holidays.

I recommend looking at samples on https://github.com/Microsoft/PowerBI-JavaScript/wiki/Apply-Report-Themes and/or posting your issue on https://community.powerbi.com/t5/Developer/bd-p/Developer.

-Trond

evanbarke commented 4 years ago

Hi there Trong,

Yes I'm sorry. I realised that after posting. I just saw Github and thought I was in a public place haha.

My apologies. Have a lovely holiday.

I have posted on the power BI community forum (developer section).

Cheers! Evan

On Wed, Dec 11, 2019 at 3:09 PM Trond Aarskog notifications@github.com wrote:

Closed #67 https://github.com/taarskog/crm-powerbi-viewer/issues/67.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taarskog/crm-powerbi-viewer/issues/67?email_source=notifications&email_token=AEU6XHULMFWCJFFZEDFDG4LQYDQ7ZA5CNFSM4JZKFGWKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVNIP4AI#event-2874211841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEU6XHXB27HWUX2HCFEGM4DQYDQ7ZANCNFSM4JZKFGWA .