Forum Discussion

Lorenz33's avatar
Lorenz33
Helper IV
6 years ago

Problems embedding a Report into Application

We have developed a report using Microsoft Power BI Desktop (optimized for Report Server) Version: 2.76.5678.1521 64-bit (January, 2020).

This report is hosted on Microsoft Power BI Report Server Version 15.0.1102.759 (January 2020).

 

We are attempting to embed this report in an MVC application writtedn in C# in Visual Studio 2017. We are using the following script:

 

<iframe style="width:100%; height:450px;" src="http://myserver.local/PBIReports/powerbi/Folder/My%20Report%20Name?rs:embed=true" frameborder="0" allowFullScreen="true"></iframe>

 

When we run the report in the application we get this message displayed:

X "This content cannot be displayed in a frame"

"To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame"

 

Any help on identifying what is wrong and solution would be greatly appreciated. Thanks.

11 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Did you try embedding in Sharepoint site to see if you are 

    This is very simple, 

    From last 2 weeks, there is no response/reply from Microsoft employees. So, try to find other alternatives meanwhile. just a suggestion.

      • Lorenz33's avatar
        Lorenz33
        Helper IV

        I went into the Advanced Properties of Power BI Report Server and set the "CustomHeadings" to:

         

        <CustomHeaders> <Header> <Name>X-Frame-Options</Name> <Pattern>(.+)((\/api)|(\/(mobilereport|report|powerbi|excel|pages)\/(.+)(rs:embed=true)))</Pattern> <Value>True</Value> </Header> </CustomHeaders>

         

        Now instead of the "This content cannot be displayed in a frame" message I get a blank screen. Any suggestions or advice on how to get this to work?