First row calculation is zero in crystal report grouping
I have added a formula in crystal reports to calculate a value. The report
also uses the grouping logic. The calculation for first group alone is
displayed as Zero, but actually has values are in database. from second
group it calculates perfectly.
The formula runs as,
WhilePrintingRecords;
numberVar Total20PercentAmount;
numberVar TotalAmount;
if {Table1.TypeCode} in [11, 13, 14, 15, 17] then
(
Total20PercentAmount:=Total20PercentAmount+{Table1.Amount}*20/100;
);
TotalAmount:=TotalAmount+Total20PercentAmount;
But the both values are dispalyed as zero only for the first group.
Please help on this.
No comments:
Post a Comment