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.

1

Display line number in ReportLab ?

By
anonymous
on 9/13/13, 7:05 AM 2,619 views

Hi,

I create a report that displays a list of customers. now how i can display line number ?

N° Name

1 Customer A...

2 Customer B---

3 Customer C...

... ...

Thanks.

2
Wolfgang Taferner
On 9/16/13, 6:15 AM

Hi Jean,

It is pretty easy...

Use the tags <seqreset id="seq" /> before entering the loop and within the loop use <seq id="seq">.</seq>

Have a nice day!

Thank you its works now .so how to do it from openoffice without touching the rml file?

anonymous
on 9/16/13, 8:01 AM

I don't know b/c I am always working directly in ReportLab (RML) as everything else is just a mess and lost in translation...but maybe you can just put these tags in the plain file (text editor instead of open/libre office) too (SXW = Sun XML Writer - http://en.wikipedia.org/wiki/OpenOffice.org_XML). Let me know if it worked for you, then I can edit my answer and add this hint.

Please do not forget to mark my answer correct in order to show other users, that it worked and your question is answered!

TaPo-IT OG, Wolfgang Taferner
on 9/16/13, 8:15 AM

Hi, i tried your answer and it worked for me, when i take the print for first time it came as 1....2...3.. but when i took the print for second time the numbering sequence starts from the number where it stopped in the first print. i.e, if i've 10 customers when i take the print of list of customers for the first time the sequence was 1.2.3.4.5.6.7.8.9.10. properly but when i print the same thing for second time in the print it is starting from 11.12.13.14.15..16.... so am i going wrong anywhere can u please suggest me..Thanks in advance...!!!

Sampath Kumar S
on 1/5/14, 10:05 AM
1

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 9/16/13, 9:41 AM

Hi,

in openoffice you can use setTag(‘para’,’xpre’) :

[[ setTag('para','seqreset',{'id':'seq'}) or removeParentNode('para')  ]]

in N° : i think it must pass by rml file : if use <seq id="seq"></seq> then generate a rml file without sxw its display a

&lt;seq id="seq"&gt;&lt;/seq&gt;

In RML, you can't use the characters "<", ">" or "&" inside any display elements such as drawString or para.

rml2pdf-userguide.pdf

it is not working in openoffice rml report.

waqar
on 12/26/13, 7:10 AM
0
waqar
On 12/27/13, 12:35 AM

In OpenOffice you can acheive this through Format/Bullet and Numbering, when openoffice convert file sxw to rml then it will convert it "seq" tag.

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

1 follower(s)

Stats

Asked: 9/13/13, 7:05 AM
Seen: 2619 times
Last updated: 3/16/15, 8:10 AM