Fox will sometimes generate erroneos results when going to preview. You need to send it to a file first to get the correct total page count.
>Dear all,
>
>I generate various report by the "REPORT FORM ...." Commands.
>
>In order to make a footer "Page XX of XXXX", I implement the folowing code to calculate the total page of the report.
>
>:
>:
>local tpage
>report form "TheReport" preview noconsole
>tpage=_pageno
>report form "TheReport" to print
>:
>:
>inwhich at the report footer I put "Page "+ str(_pageno) + " of "+ str(tpage)
>at the bottom of the report
>
>However, I get for example "Page 18 of 17"
>
>How can I fix the bug, or otherwise, implement better coding?
>
>
>
>Yours fauithfully,
>
>Ransome
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer