>Hi all,
>
>I guess my problem has been discussed in UT several times, but obviously I am too stupid to get something like "Page x of y" into my reports.
>
>The problem: on a multi page report I have the wrong number of total pages (not always, but most of the time), e.g. on a three page report the pages will show "Page 1 of 2", "Page 2 of 2", "Page 3 of 2".
>
>What I am trying to do is to print the report into nirvana and then fill a private variable with the content of _PAGENO. It looks like this:
[...]
>REPORT FORM FRX\RECHNUNG NOCONSOLE
>pnNumberOfPages = _PAGENO
>IF vlPrint
> FOR i = 1 TO lnNumberOfCopies
> REPORT FORM FRX\RECHNUNG TO PRINTER NOCONSOLE
> ENDFOR
>ELSE
> REPORT FORM FRX\RECHNUNG NOCONSOLE PREVIEW
>ENDIF
>[...]
>
>In the report pnNumberOfPages is used to fill the y in "Page x of y", while _PAGENO is used to fill the x.
>
>Am I missing something?
>
>TIA Robert
Hi Robert,
What I think you're missing is TO PROMPT Try:
REPORT FORM FRX\RECHNUNG TO PROMPT NOCONSOLE
pnNumberOfPages = _PAGENO
This will work. But it will create a text file 'prompt.txt' You will have to dispose of this afterword.
This will get rid of it
IF FILE('prompt.txt')
DELETE FILE prompt.txt
ENDIF
HTH
Mike