Search code examples
reporting-servicestextboxssrs-2008ssrs-2008-r2

How to display a textbox in SSRS based on not null value in a column from dataset


in my SSRS from dataset I get a column called TargetValues.

I need to display a textbox (Seting up the visbility rule) if I have at least one value (Not Null) for this column.

Is there any way to browse through the list and check if I have at least one not null value?

My dataset has 3 columns, Id - indicating the id of the row(int), ActualValue (int) and Target Value (int)

example 1: In this case I need to show the text box

Id ActaulValue TargetValue

  • 1, 555, Null
  • 2, 556, Null
  • 3, 557, 75

example 2: In this case I need to hide the text box

Id ActaulValue TargetValue

  • 1, 555, Null
  • 2, 556, Null
  • 3, 557, Null

Solution

  • Do you require null in your TargetValues? What is the min of the field?

    I would look at trying to manipulate the query to make the logic for hiding the text box simpler.

    For instance if you won't have negative numbers make the nulls 0 and test the Min() for 0 and use that to show/hide.

    Like =IFF(Min(Fields!TargetValues.Value) = 0,TRUE,FALSE)

    Also =IFF(IsNothing(Sum(Fields!TargetValues.Value)),TRUE,FALSE) might work