jaycee99
13th December 2010, 04:55
I got 2 before.field, which is before.field.1 and before.field.2. And then i set condition to after.field.1, if value = 0 then do not print. But when, after.field.1 not print out, i also want the before.field.1 and before.field.2 also not print out.

Is there any solution for this?

mark_h
13th December 2010, 16:03
Yes - but you need to know in the before field layouts that the after.field layout will not print. How are you checking the after.layout to not print? In the report script you can add something like:
before.field.1:
before.layout:
if value.of.after.layout = 0 then
lattr.print = false
endif

jaycee99
14th December 2010, 06:30
Hi Mark,

your solution only apply for same before.field. My problem is,

before.field-A.1:
before.layout:
a = 15



after.field-A.1:
before.layout:
do.calculation() | Will get result for B

if B = 0 then
lattr.print = false
else
lattr.print = true
endif | If calculation value is 0 then don't print


For this case, if i didn't put the print condition then it will print something like this

Result:
a = 15
B = 0

After i put the condition then it should come out only a = 15

So, i want the report not to print the a = 15 since the B = 0

Case B <> 0, then result will be
a = 15
B = 13

Case B = 0, then empty report

sameer.don
14th December 2010, 10:33
Jaycee,
It sounds too ambitious to suppress the layout once printed to report.

What you can do is, try to calculate value of B on before.field-A.1:
and then you can write as

before.field-A.1:
before.layous:
do.calculation.B()
if B=0 then
lattr.print = FALSE
flag.suppress = TRUE
endif

after.field-A.1:
before.layout:
if flag.suppress then
lattr.print = FALSE
endif

May be this could help you. Or lets wait if anyone has the solution. But, I feel once a layout is printed and sections are executed, it will not be possible to suppress it.