>But I have tried this command many times, It is giving me the right value.
>If I use it with dummy.txt it gives a message:
>printing page 1..2..3, So it may confuse the user.
>
>Thanks
WAIT WINDOW NOWAIT "Preprocessing report"
REPORT FORM MyReport TO FILE Dummy.txt NOCONSOLE
lnMaxPages = _PAGENO
WAIT CLEAR
REPORT FORM MyReport TO PRINTER
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer