I have created a Formula Field to calculate the average time of idle. However, the data appears to be suspiciously calculating data that I have suppressed. How should I rewrite the command so it doesn't calculate the suppressed data I am using Crystal Report 11 with DB2.
Suppress formula:
{@CUSTOMER DROP MAX AMOUNT} = 0
customer drop max amount
formula field as:
WhilePrintingRecords;
IF GroupName ({@DROP CUSTOMER}) = "ASHLADVNC" AND GroupName ({@TRAILER CHARGE GROUP}) = "INTCNEWNC" THEN
IF {#COUNTER} <= 1 THEN 1 ELSE 0
ELSE
1
I have a running total field summarizing field days idle
as:
CurrentDateTime - {TRAILER_CUSTOMER_ZONE.IDLE_SINCE}
But I actually use this formula within my report avg idle days yard
as:
IF ISNULL({#Avg Idle Days Yard}) THEN "N/A" ELSE TOTEXT({#Avg Idle Days Yard})
Suppressed data is only visually hidden, it always accounts for summaries, running totals. To skip suppressed data, condition must be applied within the formula.
Change the evaluate mode of running total field days idle
or avg idle days yard
(whichever is your base formula to calculate total and average) to Use a formula
Then set the formula condition as {@CUSTOMER DROP MAX AMOUNT} <> 0;
. Suppressed records will be skipped as per your formula.