How to exclude combinations of certain lines?
I have a report that is grouped twice.
At job then at task. I am trying to excluded when two fields are zero. But I get a mess of results.
A b c
GF2 task1 5 6 0
GF2 task2 0 2 0
GF2 task3 8 0 1
GF2 task4 0 7 2
GF1 Total 13 15 3
How would I excluded line only task2? When A and C are zero?
I tried at the GF2 but task(s) 1, 2 and 4 would disappear if I did " (Sum ({vdvProjectLines.numJobTRXNActlCost}, {vdvProjectLines.chrTaskNumber}) > 0
and Sum ({vdvProjectLines.numJobTRXNRvEstSal}, {vdvProjectLines.chrTaskNumber}) > 0)"
Thanks for your advice.
PN
Re: How to exclude combinations of certain lines?
What does work is if I do:
(Sum ({vdvProjectLines.numJobTRXNActlCost}, {vdvProjectLines.chrTaskNumber}) > 0.07
or Sum ({vdvProjectLines.numJobTRXNRvEstSal}, {vdvProjectLines.chrTaskNumber}) > 0.07)
For task2: I found that the amount was .07 which rounded up to 0. But this is contrary to sql logic. This statement is almost like at the group selection: "Only include records that match our clause of >.07 for column a or > .07 for column c. "
Anyone have simple explanation for this?
Re: How to exclude combinations of certain lines?
Ok to close found that this acceptable tolerance on the report.
Thank you.
Re: How to exclude combinations of certain lines?
If You want to supress when a=0 and c=0 then write the next code
Code:
(Sum ({vdvProjectLines.numJobTRXNActlCost}, {vdvProjectLines.chrTaskNumber}) = 0 AND
(Sum ({vdvProjectLines.numJobTRXNRvEstSal}, {vdvProjectLines.chrTaskNumber}) = 0)
Or
If You want to print when a<>0 or c<>0 then write the next code
Code:
(Sum ({vdvProjectLines.numJobTRXNActlCost}, {vdvProjectLines.chrTaskNumber}) <> 0 OR
(Sum ({vdvProjectLines.numJobTRXNRvEstSal}, {vdvProjectLines.chrTaskNumber}) <> 0)
JG
Re: How to exclude combinations of certain lines?
jggtz is right.
Another simple solution just to see how many fields are zero:
In the suppress formula you can place a check
zero_fields := 0;
if a = 0 then
zero_fields := zero_fields + 1;
if b = 0 then
zero_fields := zero_fields + 1;
if c = 0 then
zero_fields := zero_fields + 1;
if d = 0 then
zero_fields := zero_fields + 1;
if zero_fields >= 2 then
true
else
false;