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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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? eduardo@yashar.com.br

 

Thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.