Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
18998 มุมมอง

I have prepared a custom sales order report, including a new brand header.

Unfortunatelly header overlaps PDF report page body.

What should I do to ensure there is no overlapping between header and body? 

Thanks.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I tried putting margins everywhere and nothing was working for me. As soon as I used padding instead, it worked fine. I just added a padding-top to the content of the page, and it spaced it nicely away from the header.

อวตาร
ละทิ้ง

This worked for me, thank you.

คำตอบที่ดีที่สุด

You can create a new div which to contains all the report body.

Then you can add the following in the div: style="top:50px" and the body div should go down.

Hope that helps you! :)

Juan.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You could also try fiddling with the Header Spacing and Top Margin options in the Settings > Reports > Paper Format. Increasing Header Spacing would probably help push the body down

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I also think the best way is to do it with the Paper Format. I usually create a new paperformat.xml in the data folder of my custom module. There you can inherit the record, so you don't have to change it by hand and it will stay the same no matter where you install your custom module:

<record id="report.paperformat_euro" model="report.paperformat">
    <field name="margin_top">50</field>
    <field name="margin_bottom">40</field>
    <field name="margin_left">7</field>
    <field name="margin_right">7</field>
    <field name="header_spacing">45</field>
</record>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 23
7242
0
พ.ค. 24
2125
2
พ.ค. 24
4027
Sale Order PDF Report แก้ไขแล้ว
3
ก.พ. 24
3467
1
ก.ค. 23
11508