Forum Discussion

markces's avatar
markces
Regular Visitor
5 years ago
Solved

Remove margins in an embedded Power BI report using iFrame on a Project Online sharepoint site

My aim is to allow Project Online users to view a Power BI report from a link in the PO menu without having to open Power BI. I want them to remain within the PO sharepoint site at all times. All users have a Power BI licence but currently only access other Power BI reports via their Teams site.

 

I have used the Power BI Embed report > Website or portal option to copy the html iFrame code below. A web page was created in PO and the html was pasted into a Script Editor web part.

 

This all worked fine, except when I view the report the font is much smaller and there are large shaded vertical margins, as you can see in the sample below. Is there any way of using html code to remove the margins and resize the report so that it takes up the whole frame?

 

 

  • BTW Lionel,

    I removed the space - marginwidth="0" and also tried marginwidth="0px".

    Thx Mark.

     

  • markces's avatar
    markces
    5 years ago

    Thanks Lionel,

    have managed to change the height and width settings in the embeded code to reduce the size of the margins. Took a few tries to get the correct size image on the screen to reduce scrolling but now have a workable page. Appreciate your help.

    Regards, Mark.

5 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi markces ,

     

    Use the element selector of the browser to analyze the HTML5 and CSS3 codes of the current page. It may be that a certain tag has fixed the left and right margins.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • markces's avatar
      markces
      Regular Visitor

      Thanks Lionel,

      have managed to change the height and width settings in the embeded code to reduce the size of the margins. Took a few tries to get the correct size image on the screen to reduce scrolling but now have a workable page. Appreciate your help.

      Regards, Mark.

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi markces ,

     

    Try to add the "marginwidth" parameter in "iframe" label.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.