How to display RML custom header and footer in all page

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 16:47:34

问题


I add my own custom header and footer in RML report, the problem is when I select all the record and print, first page prints correctly, the problem occurs in second page, header and report data overlapped, so how to set header in all the pages without overlapping

<template title="High_Value_Item" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
  <frame id="first" x1="30.0" y1="27.0" width="508" height="815"/>
    <pageGraphics>
        <image x="1.3cm" y="26.0cm" height="90.0">[[company.logo or removeParentNode('image')]]</image>
        <place x="16.6cm" y="25.3cm" height="1.8cm" width="15.0cm">
        <para fontSize="7.0" fontName="Helvetica" >[[ display_address(company.partner_id) or  '' ]]</para>
        </place>
        <lines>1.3cm 24.9cm 19.9cm 24.9cm</lines>
    </pageGraphics>
</pageTemplate>

The above code from my RML report


回答1:


try this,

<template title="High_Value_Item" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
    <pageTemplate id="first">
    <frame id="first" x1="8.7cm" y1="5.0cm" height="24.0cm" width="21.5cm"/>
    <pageGraphics>
        <image x="1.3cm" y="26.0cm" height="90.0">[[company.logo or removeParentNode('image')]]</image>
        <place x="16.6cm" y="25.3cm" height="1.8cm" width="15.0cm">
        <para fontSize="7.0" fontName="Helvetica" >[[ display_address(company.partner_id) or  '' ]]</para>
        </place>
        <lines>1.3cm 24.9cm 19.9cm 24.9cm</lines>
    </pageGraphics>
</pageTemplate>

I coded in air so if any content comes in undesired place than you may change the x and y coordinate.

Hope this will help you.



来源:https://stackoverflow.com/questions/26481548/how-to-display-rml-custom-header-and-footer-in-all-page

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!