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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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