Put PAGENO directly in a textbox

I have a report where I did something like this: Var := CurrReport.PAGENO (It was actually a bit more complicated than that, which is why I did it in code). I then had a textbox in a footer section with SourceExpression Var, but this sometimes showed the wrong number. I changed the SourceExpression to CurrReport.PAGENO and it is now working fine. The wrong number was displayed when the report was just one line too long to fit on x pages. Apparently Navision: executes the C/AL code realises that the section can’t fit on Page x updates PAGENO prints the section Hence the usefulness of putting PAGENO directly in the textbox. Alastair