jsReport Display Issue: Header Overlapping with Body



  • Hello,

    I deployed a jsReport to our production environment and noticed that the header section is overlapping with the report body. However, when I tested this report in our test environment, it displayed correctly. See the following screenshots:

    In test environment:
    0_1696264020148_upload-f0238a6c-8d54-456d-8585-df3a1b194fa8

    On production:
    0_1696264066405_upload-d0a9afcf-51da-4c80-8a81-b1825e26600d

    Do you have any suggestions on how I can troubleshoot this issue? Both production and testing servers are on Windows 2019.

    Thank you!



  • What kind of header is that? Is it a header template merged using pdf utils?



  • Yes, here is the config:

    0_1696272448041_upload-fe9768fa-932e-47e0-ae0d-b2f1e897af8a

    Thank you!



  • Thanks. It looks like you just forgot to set the top margin for the main template. Could you check it?

    0_1696272933576_upload-b66b000e-37b0-42ee-8f44-7bfd5cd1b132



  • This is our main template settings:

    0_1696352826846_upload-4f10c8c2-1416-46d4-85f3-1f992f85cb08

    The jsReport version is 3.13.0. Does it seem right to you?

    Thank you!



  • I just realized that my testing environment is using jsReport 3.1.1. After I downgraded the jsReport on production from 3.13.0 to 3.1.1, the overlapping issue disappeared.

    This is the config on jsReport 3.1.1:
    0_1696353929927_upload-f72d212d-6652-4baa-a8a1-11f2260b1b6b

    Can you suggest how to adjust the 3.13.0 pdf config to make the report work correctly?

    Thank you!



  • After I downgraded the jsReport on production from 3.13.0 to 3.1.1, the overlapping issue disappeared.

    I am not aware of anything that could cause such change.

    The jsReport version is 3.13.0. Does it seem right to you?

    Your template doesn't set top margin. This means the content of the main template will start at the top and merged templates like headers will likely overlap. Try to set a top margin explicitly and check the result.



  • Setting up the top margin works on 3.13. However, the main template's CSS with .body {margin-top: 150px} introduces a large gap at the top of the first page.

    0_1696357842954_upload-192310d2-47a8-44cf-a264-085b6440ac88

    I believe that in version 3.11 and earlier, this CSS was applied to each page individually, whereas in 3.13, the .body style is considered for the entire report, not just each page.

    This means I'll have to adjust all my existing reports :-(



  • I've tried 3.13, 3.11.0, 3.1.1 and in all cases, it makes a margin just for the first page which is expected.

    Btw the page margin has this css

    @page {
          margin-top: 5cm;      
     }
    

    Your problems could be caused by a different version of chrome which may apply some specific things differently. Unfortunately, there is nothing we can do about it. jsreport just uses the latest chrome as it is without tweaking it.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.