Reputation: 193
I want to make a specific header and footer in a custom rml report (different from other reports) so I cant change the header/footer section to this company how to make a new footer to this report that will appear in all report pages
I have make the header as a repeat row in <blockTable>
but I didn't find any solutions to the footer
this sample of my rml report
<?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>
Upvotes: 0
Views: 1206
Reputation: 3207
You can add your own header footer on page like this. It repeat all pages of reports.
<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>
Upvotes: 1