Ok - I have it working, sort of! I have created a test report to test the method and have 3 sections, each is presented on its own page:
1) Report Header
2) Details a
3) Details b
in Details a the following formula has been created:
Shared StringVar PageNum:= ToText(PageNumber);
a Subreport was then inserted and the below formula inserted into the Report Footer
Shared StringVar PageNum;
Shared StringVar PageNumA:= PageNum;
PageNumA;
A third formula has now been created (below) and placed in the Main Report Header. Unfortunately the field is then completely blank; when placed in Details a or Details b it works and shows the Details a page number. I am assuming this is because the formula's are calculated after the Report Header section. Using 'Whileprintingrecords' doesn't work; I believe because PageNumber is always printed at that stage anyway. Any suggestions?
Shared StringVar PageNumA;