Master page - top margin as 0 still provides some empty space in the top

bcmp
edited February 11, 2022 in Analytics #1
<p>When setting master page top margin as 0, it produces some empty space in the top of  report in the web viewer. But when exported to pdf, there are no empty spaces.</p>
<p> </p>
<p>Any inputs to avoid the empty spaces in the top of report in the web viewer, would be great.</p>

Comments

  • <p>This is due to the fact that we need to keep a margin for interactive Viewer. To get rid of this you need to set the following on the viewer object</p>
    <pre class="_prettyXprint">
    viewer.setContentMargin(0);</pre>
    <p>If you want to do this in the report use onContentUpdate method.</p>
  • <p>Added the following the lines of code in the report design onContentUpdate section and getting the space between the toolbar and the report.</p>
    <p> </p>
    <p>this.getViewer().setContentMargin(0);</p>
    <p> </p>
    <p>Attaching the image for your reference. If sample can be shared, it would be great</p>
  • <p>Apologies for the delay as I am extremely busy these days. What version are you using? If I recall we ignore the setContent with out viewer as we need to reserve that space for the IV menu. This does work for me when I am embedding using JSAPI. It might be possible to customize a style in one of the standard css files to get rid of this as well (I am not sure). Even if this is possible it is not really supported. </p>
    <p>If this is urgent I would suggest contacting support. </p>
  • <p>when the report is viewed from the iportal, its still showing the blank spaces.  How to avoid this when viewing the report from the iportal.</p>
    <p> </p>
    <p>Version-4.6</p>
  • Clement Wong
    Clement Wong E mod
    edited September 11, 2017 #6
    <p>You can add the following JavaScript (jQuery) code in the <em>onContentUpdate </em>event:</p>
    <pre class="_prettyXprint _lang-">
    $("div.floatPanel").children(0).css("margin-top", 0);
    </pre>
    <p>Please note that by removing the white space, you can be potentially hide the Interactive Viewer popup icon/functions above the column headings.</p>
    Warning No formatter is installed for the format ipb
  • <p>Thanks Clement!</p>