hide field

Stimulsoft Reports.WEB discussion
Post Reply
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

hide field

Post 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?
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

hide field

Post 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.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

hide field

Post 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.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

hide field

Post by Jan »

Hello,

Please use following expression:

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

Thank you.
Post Reply