Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Haderach
Frequent Visitor

Problem embeding report in TWebBrowser (IE9)

Hello,

 

We are developping an application in Delphi Tokyo 10.2 in which we are embeding powerBI reports in a TWebBrowser component.

This component is using IE 9 engine.

 

Everything was working fine severals weeks ago.

 

Now we have problem on postMessage on URL like this : https://app.powerbi.com/reportEmbed?reportId=.........

 

Our process is to load this URL (ie : https://app.powerbi.com/reportEmbed?reportId=5cacc672-0a61-4972-92bf-5373ac9386d8) in the TWebBrowser and on DocumentComplete event, we execute javascript postMessage(message, '*') with message build in JSON with action : loadReport and accessToken : the generated access token with the right client ID and azure tenant ID.

 

Why it is nor working anymore in IE 9 ?

It is still working manually in IE10, 11, Edge, Firefox and Chrome but our TWebBrowser component only works with IE9.

 

Can you please help us with this problem?

Any solution to embed powerBI report in a Delphi application?

 

Sincerely

1 ACCEPTED SOLUTION

Thank you for you reply.

 

I have tried to change the registry key but it does not work.

It is an incompatibility between powerBi javascript code and TWebbrowser.

 

The only way we have found to solve this problem is to change the TWebBrowser component by a TChromium component available here : https://github.com/salvadordf/CEF4Delphi

 

 

View solution in original post

4 REPLIES 4
Haderach
Frequent Visitor

More info : We got this javascript error on loading this URL : https://app.powerbi.com/reportEmbed?reportId=5cacc672-0a61-4972-92bf-5373ac9386d8

 

https://app.powerbi.com/13.0.3154.215/scripts/powerbiportal.dependencies.externals.bundle.min.js

Line 937, Caracter 8729, Unspecified Error, Code 0

 

Then severals javascript errors occur.

 

Please some help?

Does it have to be IE9? This is just the default-mode for maximum compatibility with legacy apps (if I remember correctly, it should be even IE7).

You can easily switch to "cutting edge" by adding a registry key for your binary: MSDN

 

Bastian

 

PS: glad to see a Delphi developer these days. I've been one myself for many years.

Thank you for you reply.

 

I have tried to change the registry key but it does not work.

It is an incompatibility between powerBi javascript code and TWebbrowser.

 

The only way we have found to solve this problem is to change the TWebBrowser component by a TChromium component available here : https://github.com/salvadordf/CEF4Delphi

 

 

Hi there!

 

I am a long time Delphi user and I am about to integrate PowerBI with Delphi

 

I would like to exchange ideas or even code with you.

 

Do you mind on contact me? [email protected]

 

Thank you!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors