lets say i have 3 pages in crystal report there should be a subtotal per page
You need to use three formulas ;
Formula 1 : @Reset
Place Formula2 in Details section and suppress
Place Formula3 in Page Footer and don't suppress, this is your subtotal
For Duplicates Records :
You need to use three formulas ;
Formula 1 : @Reset
Code:
Formula 2 : @SumNumberVar x; WhilePrintingRecords; x:=0;
Code:
Formula 3 : @DisplayNumberVar x; WhilePrintingRecords; x:=x+{DatabaseField};
Code:
Place Formula1 in Page Header section and suppressNumberVar x; WhilePrintingRecords; x
Place Formula2 in Details section and suppress
Place Formula3 in Page Footer and don't suppress, this is your subtotal
Note :
For Duplicates Records :
NumberVar x;
WhilePrintingRecords;
IF OnFirstRecord= true Then
x:= {Databasefield}
Else
if {DatabasefieldKey} <> previous( Databasefieldkey) Then
x:=x+{Databasefield}
ELSe
x:=x ;
No comments:
Post a Comment