I am trying to display the "Hours Worked" for Fleet items which are grouped by 'Vehicle Category' [Grp1] then by 'Fleet Item', [Grp2],(to get summary totals of fuel Qty & $ transactions). (n.b. Details section is suppressed).
I have also placed the 'HrsMeter' field onto GH2, (ie, along with the SUMMARISED fuel Qty & $), & need a summary of 'HrsMeter' in GF1.
I have tried to used the "3-formula trick" as follows...
Formula 1...WhilePrintingRecords; NumberVar Hrs:=0;
(Suppressed in GH1).
Formula 2...WhilePrintingRecords;NumberVar Hrs;Hrs:=Hrs+{MFFBS.HRSMETER} (Suppressed in GH2).
Formula 3...WhilePrintingRecords;NumberVar Hrs;
(Displayed in GF1).
Formula 3 seems to work OK, UNTIL a page-break !! ie, If a Group1 'Category' goes over one page, the summary total of HrsWorked only adds up the Group2 'Fleet Items' Hours on the LAST PAGE OF Grp1.
Is there a simple solution to this, or am I doing things the hard way in the first place ?!
Would appreciate any expert advice on this issue.
I have also placed the 'HrsMeter' field onto GH2, (ie, along with the SUMMARISED fuel Qty & $), & need a summary of 'HrsMeter' in GF1.
I have tried to used the "3-formula trick" as follows...
Formula 1...WhilePrintingRecords; NumberVar Hrs:=0;
(Suppressed in GH1).
Formula 2...WhilePrintingRecords;NumberVar Hrs;Hrs:=Hrs+{MFFBS.HRSMETER} (Suppressed in GH2).
Formula 3...WhilePrintingRecords;NumberVar Hrs;
(Displayed in GF1).
Formula 3 seems to work OK, UNTIL a page-break !! ie, If a Group1 'Category' goes over one page, the summary total of HrsWorked only adds up the Group2 'Fleet Items' Hours on the LAST PAGE OF Grp1.
Is there a simple solution to this, or am I doing things the hard way in the first place ?!
Would appreciate any expert advice on this issue.