Hi all,<br />
<br />
I'm trying to reproduce the exemple shown in the <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/project/notable2.5.php#jump_4'>Release notes of BIRT 2.5</a> concerning the new OnPageStart/OnPageEnd events, since we will need similar functionality in our own reports.<br />
<br />
I'm using BIRT 2.6.2 and I attached my sample report. My report runs on the Classic Models sample database.<br />
<br />
Here are the basic steps I followed...<br />
<ul class='bbc'><li>Create the FIRST_ORDER and LAST_ORDER Page variables</li><li>In OnPageStart of the report, set both variables to null</li><li>In the onPageBreak event of my Order Number field, set the the FIRST_ORDER variable if it is null and set the LAST_ORDER variable</li><li>In the footer of the master page, add two auto texts to display both variables</li></ul>
<br />
My two auto text fields in the footer of the master page are always empty.<br />
<br />
So, I added messages to the report (logged to C:\report.log) to try to figure out what is going on... Here are my observations:<br />
<ul class='bbc'><li>The auto texts are rendered first</li><li>The onPageStart and onPageEnd of the report and of the master page are called only once each, even though there are more than 100 pages in my report. I thought these events were called for each page of the report.</li><li>The onPageBreak event of my Order Number field is called only 4 times. I thought this event would be called for every Order in my report, whenever a page break occured.</li></ul>
<br />
Are my assumptions correct?<br />
<br />
I even tried setting the text of my auto text fields in the onRender event, but since this is called only once at the beginning of the report, I'm out of luck!<br />
<br />
Here is a full sample of the report.log file generated by my report: I didn't truncate it and my report has 133 pages!<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>In Report.initialize
In Report.beforeFactory
In Report.beforeRender
In First_order.onRender
In Last_order.onRender
In Report.onPageStart
In MasterPage.onPageStart
In onPageBreak - 10123
In onPageBreak - 10298
In onPageBreak - 10345
In onPageBreak - 10124
In MasterPage.onPageEnd
In Report.onPageEnd
In Report.afterRender
In Report.afterFactory</pre>
<br />
Can anyone help me on this? What am I doing wrong?<br />
<br />
Thank you for your help!<br />
<br />
Ghis