I want to add page number in my custom page footer. But I found the page number is different for each page. So how can I create the template for footer?
The total number of pages is not known during the generation of the report so you cannot get to that but you can get to the current physical and/or logical page number. You can look at the help for the PhysicalPageNumber for an example.