I have a requirement to add page number and total page to the report directly, which is a form. I copy and paste those 2 fields from master page over the report. The total page shows the correct value; however, the current page always shows a value of one. Is there anything I need to setup to get it working correctly?
Thanks,
On 1/3/2012 6:52 PM, Jason Nguyen wrote:
> I have a requirement to add page number and total page to the report
> directly, which is a form. I copy and paste those 2 fields from master
> page over the report. The total page shows the correct value; however,
> the current page always shows a value of one. Is there anything I need
> to setup to get it working correctly?
> Thanks,
After I changed to <VALUE-OF>pageNumber</VALUE-OF>
I get 1's in all the header pages of the form. Is pageNumber a reserved name in Birt? Is it tied to a particular field at all? How does that variable get incremented in Birt? Thanks.
pageNumber is a reserved name but works on the layout in later versions
of BIRT. It has to be viewed using the frameset mapping (separate run
and render task). This is where the variable gets incremented.
Jason
On 1/4/2012 5:00 PM, Jason Nguyen wrote:
> After I changed to <VALUE-OF>pageNumber</VALUE-OF>
> I get 1's in all the header pages of the form. Is pageNumber a reserved
> name in Birt? Is it tied to a particular field at all? How does that
> variable get incremented in Birt? Thanks.
How are you viewing the report? With the web viewer using the frameset
mapping?
Jason
On 1/5/2012 10:42 AM, Jason Nguyen wrote:
> Are you saying version 2.3.2 has a bug that pagenumber is not working?
> Is there a way that I can get around this bug?
I am attaching a 3.7 report. Look at the green field. BTW in the
designer it does not work correctly when previewing directly to pdf. I
first preview in the web viewer and then export to pdf and it works.
This is because view in pdf uses a runandrender task as opposed to run
task then a separate render task. Page scripts have to have separate tasks.
Jason
On 1/5/2012 1:59 PM, Jason Nguyen wrote:
> I am viewing the report in pdf. Do you have a sample code somewhere?
> What version of Birt the pageNumber is working properly?