本文介绍了如何在所有页面中显示RML自定义页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在RML报告中添加了自己的自定义页眉和页脚,问题是当我选择所有记录并打印时,第一页打印正确,第二页出现了问题,页眉和报表数据重叠,因此如何设置页眉在所有页面中都没有重叠

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.([email protected])" 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>

我的RML报告中的上述代码

The above code from my RML report

推荐答案

尝试一下,

<template title="High_Value_Item" author="OpenERP S.A.([email protected])" 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>

我在空中编码,因此如果有任何内容进入不需要的地方,则可以更改 x y 坐标.

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.

这篇关于如何在所有页面中显示RML自定义页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 12:22