Page 1 of 1

hide field

Posted: Tue Sep 29, 2009 9:23 am
by Leandro
I have a text object on the page with the Text Format property equal to (##) ####-####

When the value of this object is zero is being printed '() - '
I tried a condition for this field when it is equal to zero, but it did not work, follows:
Image

What should I do to hide the field when its value is zero?

hide field

Posted: Wed Sep 30, 2009 2:36 am
by Andrew
Hello,

Please use the HideZeros property. In this case, if the value is 0, then the text will not be printed.

Thank you.

hide field

Posted: Wed Sep 30, 2009 7:14 am
by Leandro
I informed the option HideZeros true, but when compiling the report displays the following message:
RemFone Input string was not in a correct format.

It has something to do with the Text Format, and this is (##) ####-####?
When I remove the Text Format compiles the report without errors.

hide field

Posted: Wed Sep 30, 2009 8:51 am
by Jan
Hello,

Please use following expression:

{MyDataSource.MyField == 0 ? "() -" : MyDataSource.MyField.ToString("(##) ####-#### ")}

Thank you.