Repeating records

Albert Cervera i Areny 2 dic. 2009

It's quite usual the need of repeating a page several times. For example, you may need to print 4 labels for a given delivery, one per packet. Until now, the only way of creating those four labels using Jasper Reports in OpenERP was by coding it.

Today, the jasper_reports module supports a new property in the report called OPENERP_COPIES_FIELD. If set, the module will repeat each record by the number of times indicated by the field in that property. So if the number of packets was stored in a field called packets you should just set OPENERP_COPIES_FIELD to packets and that's it.