Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Page x of y in rml report (total page count)

By
Antanas
on 11/28/13, 2:38 AM 4,478 views

Hello,

I want to achieve 'page x of y' in a paragraph, so that paragraph style could be applied to these values, like:

<place x="14cm" y="20cm" height="2cm" width="5cm">
    <para style="mystyle">Page x of y</para>
</place>

The snippet below displays page number, but does not display total page count, looks like pageCount is not rendered at all:

<place x="14cm" y="20cm" height="2cm" width="5cm">
    <para style="mystyle">Page <pageNumber/> of  <pageCount/></para>
</place>

A workaround could be to display <pagecount/> by use of drawstring, but then font size cannot be changed:

<drawString x="14cm" y="20cm"><pageCount/></drawString>

Are there other options to achieve 'Page x of y'? By use of sequences maybe?

It is a bug that not fixed yet. Take a look here pageCount Bug. Maybe problem can be solved by a small patch attached there.

Keyur
on 11/28/13, 2:50 AM
0
Midhunmadhu
On 4/8/15, 4:42 AM

Try like this in your rml code


<pageGraphics>

<drawCentredString x="14.0cm" y="0.6cm">Page: <pageNumber/> of </drawCentredString>

<drawCentredString x="15.0cm" y="0.6cm"><pageCount/>

</drawCentredString>

</pageGraphics>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 11/28/13, 2:38 AM
Seen: 4478 times
Last updated: 4/8/15, 4:43 AM