Comment 8 for bug 551485

Revision history for this message
Dhara Shah (OpenERP) (dsh-openerp) wrote : Re: Reports: printing a title or reference on each page

HI,

> Report engine process data of report first and then the page template(header/footer..etc).

By this ,I mean story tag of rml is processed first,and we have number of story = number of object for which we want to print the report.
At last, pageTemplate will be processed (template tag of rml).At this time o.name will have name of object which processed last by story(suppose we are printing report for id 1,2,3 - so o.name will have name of order id =3 ) while processing template.

Your patch works perfectly fine when I print report for one object.

Below are the steps I follow after applying your patch of report_sxw
1) Added [[ setPageTitle(o.name) ]] in sale order report.
2) Added [[page_title]] in footer
3) From tree view selected more than one sale order and print order report
All page title will have same value ,no matter sale order are different.I was trying to point this scenario.

We can use [[]] in header/footer.

I hope I am clear.
Thanks ,
Dhara