Odoo Help


Hello Monisha,

If you want to generate a tabular structure in you rml report you can use <blockTable> .. </blockTable> tag, so you can compare this with the html <Table>..</Table> tag. But the thing is while creating the <blockTable> you need to specify how many columns would be there under it using "colWidths" attribute. See example

<blockTable colWidths="50.0,40.0,25.0">



This width values depends upon the width specified for your rml report under the <frame> tag, so generally you have to distribute your columns width accordingly, whatever no of columns you have. If there is a mismatch in specifying no of colWidths and columns designed under <blockTable> then system will throw and error as "Attribute Erro".

Also there is another attribute like "colWidths", that is "style" where you can specify which style will be applied to the specific <blockTable>. See Example

<blockTable colWidths="55.0" style="tbl_labels">



So here you can see that style name "tbl_labels" is been applied to this blockTable. Now this style is to be defined above the <blockTable> under <stylesheet> .. </stylesheet> tag where you will have to define the tag <paraStyle>. See Example


<paraStyle name="tbl_labels" fontName="Courier" fontSize="12.0" leading="15" alignment="CENTER"/>


So, by defining style you can set the text alignment, text-colour, leading space, spacebefore and spaceafter blocktable ,font name, font size.

Under the blocktable you can iterate the loop using <section>.. </section> and <repeatIn> tag.


Good answer. Additional Information can be found in the RML User Guide: http://www.reportlab.com/docs/rml2pdf-userguide.pdf

René Schuster
on 7/7/14, 5:15 AM

Thank you @Rene Schuster

Hiren Vora - CEO at Emipro Technologies Pvt. Ltd. India
on 7/7/14, 6:03 AM
On 7/7/14, 3:16 AM

Hi Monisha
<blockTable> -->  Its a simple tag which indicates that now you are going create a table like structure i.e. you are going to work with a table. Simply it is the starting point tag to workwith table in or creating tables in rml. This is similar to <table> tag in html, if you are familiar with basic html. We can write as many as desire <tr> and <td> tags between the <blockTable> </blockTable>.where <tr>creates rows and we keep <td> inside <tr> </tr> to create columns. All tags should be closed propely</ ...>.


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.


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)


Asked: 7/6/14, 11:53 PM
Seen: 3212 times
Last updated: 3/16/15, 8:10 AM