Silvio,
>Is there a way of knowing how many pages do my report has ? In a variable like _pageno, for example...
in addition to what Sergey and Rudolfo suggested you can redirect the output to the NUL device, so you don't have to delete the temporary file afterwards. This should also be a little faster.
Report form test.frx to file nul NoConsole
? _PAGENO
HTH,
Armin