Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 how to suppress print of zero values?

Author  Topic 

malcolm
Starting Member

2 Posts

Posted - 2006-04-02 : 15:32:18
Please:

(1) How do I suppress the printing of a value in a report field when it is ZERO?

(2) I just want it to be blank, instead . . .

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-04-03 : 00:34:17
select nullif([YourValue], 0)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-03 : 02:12:26
Or

In Crystal Reports there is a feature Suppress If Zero. See if there is such feature in SSRS. If so make use of it

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

snktheone
Starting Member

20 Posts

Posted - 2006-04-06 : 02:31:15
there is a crude way of doing it
you can use the following

=IIF(Field.field_name!Value = "",0,Field.field_name!Value)
wish it helps you
Go to Top of Page

maddogs
Starting Member

2 Posts

Posted - 2006-04-17 : 09:09:57
Leave the field value alone (no need to use an expression), go to the properties for the field and use a custom format such as:

#,##0.00;(#,##0.00);''

Which will present a display of:

1,234.56 - when the value is positive 1234.56
(1,234.56) - when the value is negative -1234.56
- (blank) when the value is zero

The semicolons separate and tell the implicit format function used in the custom format properties box how to independently format positive, negative and zero values. You don't need to specify the exact first two sections for the format specified above, you can use whatever format you want for positive and negative values, the important part is the :'' which indicates to display blanks when the value is zero.

HTH,
maddog
Go to Top of Page

maddogs
Starting Member

2 Posts

Posted - 2006-04-17 : 09:13:46
To correct typo in my post, the proper content should have been
...the important part is the ;'' which...
Go to Top of Page
   

- Advertisement -