Its working! - I added the following to the formulas you gave me, let me know what you think.
xLastPage
Shared StringVar xLastPage; //Original Formula
WhilePrintingRecords; //Original formula
If PageNumber = TotalPageCount
Then
xLastPage:= 'Y'
Else
xLastPage:= 'N'
xSubTotalPerPage
Shared NumberVar xSubtotal;
Shared numbervar xSubDisplay;
WhilePrintingRecords;
IF {@xCnt} = 'Y' or {@xLastPage} = 'Y'
THEN
(
xSubDisplay:= xSubtotal + {@QTRSubjectAmt};
xSubDisplay;
)
ELSE
(
(
xSubDisplay:= xSubtotal;
xSubtotal:= xSubtotal + {@QTRSubjectAmt};
xShowSubtotal
shared NumberVar xSubDisplay;
shared NumberVar xSubTotal;
WhilePrintingRecords;
IF {@xCnt} = 'Y' or {@xLastPage} = 'Y'
THEN
(
xSubTotal:= 0;
xSubDisplay;
)
ELSE
0;