Wow! That's a huge file. I do not think that {thispage} or {lastpage} ESCAPECHAR functions can have a format applied to the number used for PDF or RTF output -- I think of the page number(s) inserted by ESCAPECHAR as just being "plopped" down into the file.
Is there any way to reduce the number of pages, such as with BY group processing???