In the sub reoprt, you have to use type the folling:
Shared numberVar intX;
intX:= sum({field}]); instead of just use grand sum
Afterwards, in the main report, you have to tyep the following:
Shared numberVar intX;
intX
You can display the Grand total of the sub report in this way as long as the session that contains formula field in the main report is placed underneath the session that contains the sub report.