Greg
Greg

Reputation: 504

SSRS Expression for hiding the row when a column value = 0

I'm attempting to hide a row based on a column having the value 0. The Quantity column is a decimal datatype.

I'm trying =IIf(Fields!Quantity.Value = 0 True,False) in row visibility

My error is:

error: [BC30455] Argument not specified for parameter 'TruePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.

class   |  Quantity | AcctV | ExtVal |
GENERAL |    20     |  49   |  980   |
RETAIL  |    0      |   0   |  0     |   <-- This should be invisible 

Upvotes: 4

Views: 11878

Answers (2)

Mahmut Bedir
Mahmut Bedir

Reputation: 494

If all row datas are zero you can hide row group visibility expression.

=IIf((Sum(Fields!Data1.Value) = 0) AND (Sum(Fields!Data2.Value) = 0) AND (Sum(Fields!Data3.Value) = 0) AND (Sum(Fields!Data3.Value) = 0) AND (Sum(Fields!Data4.Value) = 0) AND (Sum(Fields!Data5.Value) = 0) AND (Sum(Fields!Data6.Value) = 0), True,False)

enter image description here

enter image description here

Upvotes: 1

Alan Schofield
Alan Schofield

Reputation: 21738

You are missing a comma after the zero

=IIf(Fields!Quantity.Value = 0, True,False)

Actually you can simplify the whole thing and just use

=Fields!Quantity.Value = 0

as this will return true or false anyway. No need for IIF

Upvotes: 8

Related Questions