TextFormat - Zero value

Stimulsoft Reports.NET discussion
Post Reply
dikan
Posts: 202
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

TextFormat - Zero value

Post by dikan »

Hi,

I would like to represent values as blank field if numeric value is zero but I could not find any appropriate picture.

Is this possible?


Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

TextFormat - Zero value

Post by Jan »

Hello,

You can use following expression:

Code: Select all

{MyDataSource["MyField"] == null || MyDataSource["MyField"] == DBNull.Value ? "" : MyDataSource.MyField.ToString()}
Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

TextFormat - Zero value

Post by Brendan »

There's also a property on the text component called HideZeros. Setting this to true will hide the value if it is the number zero.
dikan
Posts: 202
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

TextFormat - Zero value

Post by dikan »

Brendan wrote:There's also a property on the text component called HideZeros. Setting this to true will hide the value if it is the number zero.
Thanks Brendan,
I believed that answer is simple but I could not find it. Options with coding is always possible but not desirable. ;-)


Post Reply