Hide field from Tablix based on query field valu

  • Hi,

    I have a report where there are fields like Field1,Field2,Field3,Field4 etc . In the report query there is a field named IsParentAccount . If it is 0 then I need to hide Field4 from the dataset else if IsParentAcoount = 1 then Show Field4 . I am using expression

    =IIF(Fields!IsParentaccount.Value.Equals(1),False,True) in the hidden expression for this field . When no rows returned for this dataset then I get an error .

    "The Hidden expression for the tectbox 'Textbox6' contains an error:Object reference not set to an instance of an object "

    Please help

    Thanks,

    PSB

  • Any feedback will be appreciated .

    Thanks,

    PSB

  • wrap the IIF in a test for records? Maybe you can short-circuit it that way.

  • PSB (3/18/2015)


    Hi,

    I have a report where there are fields like Field1,Field2,Field3,Field4 etc . In the report query there is a field named IsParentAccount . If it is 0 then I need to hide Field4 from the dataset else if IsParentAcoount = 1 then Show Field4 . I am using expression

    =IIF(Fields!IsParentaccount.Value.Equals(1),False,True) in the hidden expression for this field . When no rows returned for this dataset then I get an error .

    "The Hidden expression for the tectbox 'Textbox6' contains an error:Object reference not set to an instance of an object "

    Please help

    Thanks,

    PSB

    Does this work?

    =IIF(Fields!IsParentaccount.Value.Equals(1) OR Fields!IsParentaccount.IsMissing,False,True)

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply