report, don't print when 0

Hi all,

When printing a report, i wish to be able to specify a print when or don’t print when clause.

For example, if the data in a field is 0, then don’t print.

In Visual FoxPro there is an option for Print When in the report designer for each field. You can say
If x <> 0
If the data (x) does not equal 0 it prints, otherwise, it leaves that field blank.

Is there a way to do this in xojo?

Cheers
Andrew

never used the report tool in XOJO, but if it can accept functions as well a variables then try this


if(x=0," ",x)

Not really,

But your suggestion gave me an idea.

in the beforeprinting event of the textfield I added the code:

if me.text = “0” then
me.text = " "
end if

This works well.

Thanks @Dave S for the brain jolt!