【问题标题】:openerp 6.1 make a new rml reportopenerp 6.1 制作新的 rml 报告
【发布时间】:2013-02-14 23:48:18
【问题描述】:

我想在自定义 rml 报告中制作特定的页眉和页脚(与其他报告不同),因此我无法将页眉/页脚部分更改为该公司 如何为该报告创建一个将出现在所有报告页面中的新页脚

我已在<blockTable> 中将页眉作为重复行,但我没有找到页脚的任何解决方案

我的 rml 报告示例

 <?xml version="1.0" encoding="UTF-8"?>
<document filename="test.pdf">
  <template pageSize="(842.0,595.0)" title="Test" author="Martin Simon" allowSplitting="20">
    <pageTemplate id="main">
      <pageGraphics>
            <image file="addons/sim/report/org.jpg" x="0" y="0" width="842" height="595"/>
      </pageGraphics>
      <frame id="first" x1="72.0" y1="122.0" width="707" height="404"/>
    </pageTemplate>
  </template>
  <story>
    <blockTable repeatRows="1">
     <tr>
        <td>
            Test Header
        </td>
     </tr>
      <tr>[[ repeatIn(objects,'o') ]]
        <td>
          <para style="Table_20_Contents">

          </para>
        </td>
      </tr>
    </blockTable>
   <para name="footer">
        Test footer
    </para>
  </story>
</document>

【问题讨论】:

    标签: reporting openerp


    【解决方案1】:

    您可以像这样在页面上添加自己的页眉页脚。它会重复报告的所有页面。

    <template title="TEST" author="Hello" allowSplitting="20">
        <pageTemplate id="first">
          <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
          <pageGraphics>
               <!-- Header -->
                <image x="14cm" y="25.6cm" height="40.0">[[ company.logo or removeParentNode('image') ]]</image>
                    <setFont name="Helvetica" size="10.0"/>
                    <drawString x="1cm" y="27.2cm">Main Header</drawString>
                    <!-- Order Details -->
                    <place x="33" y="18cm" width="530.0" height="205.0">
                        <blockTable colWidths="265,265" style="Table1">
                            <tr>
                                <td>Header Value 1</td>
                                <td><para style="normal2-center">Header Value 2</para></td>
                            </tr>
                        </blockTable>
            </place>
    
                        <!-- footer -->
            <place x="33" y="55cm" width="530.0" height="205.0">
                    <blockTable colWidths="265" style="Table1">
                                <tr><td><para style="normal2-center">Footer Value</para></td></tr>
                            </blockTable>
                        </place>
            </pageGraphics>
        </pageTemplate>
      </template>
    

    【讨论】:

    • 非常感谢它的工作我有一个问题,如果你能帮助我,我以前在水晶报告中工作过,有没有一种工具可以帮助我也在水晶报告中我有报告标题并报告页脚和页眉和页脚以及显示表格的重复区域是否有类似的东西在 openerp
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-04
    • 1970-01-01
    • 2012-09-01
    • 2012-08-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多