Odoo Help

0

<pageCount/> in rml is not rendering value?

By
Hariharan
on 7/21/14, 5:11 AM 951 views

     I want to get the page number as Page X of Y where X is the current page number and Y is the total number of page count. I am getting pagenumber by <pageNumber/> tag but <pageCount/> is not rendering its value. Please acknowledge with solution.

Inside

Hariharan
on 7/22/14, 7:11 AM
1

Bole

--Bole--
2425
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 7/22/14, 2:37 AM

Only way to use pagecount is to put pagecount part in the beginning of your rml file.. Example:

<?xml version="1.0"?>
<document filename="test.pdf">
  <template pageSize="(842.0,595.0)" title="Report Title here" author="Anankin Skywalker" allowSplitting="20">
    <pageTemplate id="first">
      <frame id="first" x1="0.0" y1="16.0" width="842" height="525"/>
      <pageGraphic>
            <drawString x="23.87cm" y="19.9cm">Page: <pageNumber/>/ of <pageCount/></drawString>
      </pageGraphics>
    </pageTemplate>
  </template>
  <stylesheet>....

You need to do it like this because pageNumber is rendered for each page as the page is rendered, but pageCount is actualy rendered after all pages are rendered because there is no way the program can know how much pages will it take for report... so the actual pageCount value is the last thing that is written to rendered pdf file... 

 

hope this will be of help

 

0
Michael St-Georges
On 7/21/14, 6:31 PM

Is your pagecount in a para or drawstring? I know there has been some troubles with pagecount in para tags.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/21/14, 5:11 AM
Seen: 951 times
Last updated: 3/16/15, 8:10 AM