cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Re: Embed group report problem


@Eric_Zhang wrote:

@vospitannikov

 

How did you embed the report, did you follow this sample Integrate a report into an app?

 

Also please ensure the token is not expired, did you try to get a new token and embed?


@supermulder

@vospitannikov has confirmed that he followed this link.

Highlighted
Frequent Visitor

Re: Embed group report problem

Thank you. I finally found a solution.

 

I´m not using the powerbi-javascript-library anymore, regarding of the issue that it is not possible to set the groupid of a report at the moment.

 

Instead i use the following javascript-code (based on the provided example).

 

<script>

function loadReportIntoIframe(reportId,groupId,iframeId){
    var iframe = document.getElementById(iframeId);
    var iframeUrl = 'https://app.powerbi.com/reportEmbed?reportId='+reportId;
    if (groupId){
        iframeUrl = iframeUrl + '&groupId=' + groupId;
    }
    iframe.src=iframeUrl;
    iframe.onload = postActionLoadReport;
}

// Post the access token to the IFrame
function postActionLoadReport() {
    // Construct the push message structure
    // this structure also supports setting the reportId, groupId, height, and width.
    // when using a report in a group, you must provide the groupId on the iFrame SRC
    var m = {
        action: "loadReport",
        accessToken: 'YOUR_AAD_ACCESSKEY'
    };
    message = JSON.stringify(m);

    // push the message.
    iframe = document.getElementById('iFrameEmbedReport');
    iframe.contentWindow.postMessage(message, "*");;
}
</script>

Sample:

 

Loading a report from your worksspace:

 

<a href="javascript&colon;loadReportIntoIframe('REPORT_ID','','IFRAME_ID')" >REPORT NAME</a>

Loading a report from group:

<a href="javascript&colon;loadReportIntoIframe('REPORT_ID','GROUP_ID','IFRAME_ID')" >REPORT_NAME</a>

Next i will try to do the same with powerbi dashboards ...

Highlighted
Frequent Visitor

Re: Embed group report problem

@Eric_Zhang 

 

you said you made it work, did you try accessing reports from new groups? Since, we're having the same problem only with new groups (for groups that were created like 3 months ago we don't have any problem at all) and we're also following the tutorial you mentioned.

 

regards

Highlighted
Frequent Visitor

Re: Embed group report problem

@smolina74

 

Maybe you can try me approach (posted above) - with this i can access any report, regardles of its age.

 

@Eric_Zhang

 

At the moment it seams to be that it is only possible to embed dashboard tiles into iframes and not the dashboards itself.

There is a highly rated ticket regarding this issue - https://ideas.powerbi.com/forums/268152-developer-apis/suggestions/8528704-allow-powerbi-dashboards-...

 

Do you know when is this going to be integrated ? Do you know other ways to embed dashboards that are working today?

Highlighted
Frequent Visitor

Re: Embed group report problem

 
Highlighted
Frequent Visitor

Re: Embed group report problem

We have exactly the same problem. Embedding of personal reports still works perfectly (except in Chrome) but since recently group reports are not working anymore. We have been using the approach to add a groupID parameter to the report Url but we also tried to set group and report ID via post message with the same negative result.

Highlighted
Helper I
Helper I

Re: Embed group report problem

Hell @Eric_Zhang

Thank you for testing group report integration

 

Can you confirm, that this integration works correctly even if you didn't open PowerBI portal before testing?

So, steps to reproduce should be like this:

  1. close all browser windows
  2. open page with embed report
  3. the report works as expected

It is important to close all browser windows before testing because, as @hesmono said, if you login to PowerBI portal, then integration works as expected. It looks like some additional cookies such as ".AspNet.Cookies", "ASP.NET_SessionId" from app.powerbi.com domain are added during login to PowerBI portal

 

Thank you in advance

Highlighted
Helper I
Helper I

Re: Embed group report problem

@BjoernLueers@supermulder@smolina74@Eric_Zhang

 

I believe that this is PowerBI server side error
I've reported issue with detailed steps to reproduce:
https://ideas.powerbi.com/forums/360879-issues/suggestions/16694833-error-group-reports-embedding-wo...
I would really appreciate if you can vote for it
Thank you in advance

Highlighted
Regular Visitor

Re: Embed group report problem

I've had the same problem... "This content is not available. Learn more about Power BI" message was showing everytime I tried to open embedded Power BI report in my application. Report was loaded only after I signed to Power BI account and refreshed the page with report in my application.

 

However, everything is working fine after I applied the newest update (November) and published the report. 

 

Thanks, Power BI team! 🙂

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!