In the Paper Layout view, click the Line Color tool in the tool palette.
In the color palette, click No Line.
Click the Text tool in the tool palette.
Position the cursor in the top margin where you would like the page number to appear, and click to create a boilerplate object.
In the new boilerplate object, type
Page &F_PAGENO of &F_TOTAL_PAGENO.
In the report output, the current page number will appear where you reference the field F_PAGENO, while the total number of pages for each master will appear where you reference the field F_TOTAL_PAGENO. If you wish, you can resize the page number boilerplate text object to lengthen it to ensure that no values for F_TOTAL_PAGENO get truncated.
Save and run your report. Your final report output should look something like this: