visibility/hidden property

  • I want to hide a row if a value in field is blank. This is what I have in the visibility/hidden properties but it still showing the rows.

    =iif(First(Fields!related_ticket.Value, "main") = "", true, false)

  • is250sp (4/30/2012)


    I want to hide a row if a value in field is blank. This is what I have in the visibility/hidden properties but it still showing the rows.

    =iif(First(Fields!related_ticket.Value, "main") = "", true, false)

    Is your value null or blank.

    This might work

    =iif(IsNothing(First(Fields!related_ticket.Value, "main")), true, false)

  • The value is blank and your code didnt work. Its still showing the blank rows

  • Does this help?

    =iif(Fields!related_ticket.Value = " ", true, false)

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • Good point Andy. Is there a reason to use First in your expression?

  • First will take the first row in the dataset (after all sorting ect) so in this case its not needed as we want all rows to be evaluated

    Cheers

    Andy

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • Andy Hyslop (5/1/2012)


    Does this help?

    =iif(Fields!related_ticket.Value = " ", true, false)

    Andy

    I could've sworn I tested it without the dataset name yesterday and it error out. This script works but I had to remove the space between the double quotes. Thanks!

  • It's happened to us all at one point or another! No probs glad to help 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • So I went further with this but need more help. I created a report parameter called Expand_Collapse to hide/show the rows. Here is the code I am using in Visibility.Hidden which works fine. Basically when the user select Collapse, all the rows are hidden. When they select Expand, display the rows but only if related_ticket has data.

    =iif(Parameters!Expand_Collapse.Value = "C", true,

    iif(Fields!related_ticket.Value = "", true, false))

    However, the user also want to toggle those rows using the Visibility.ToggleItem property. The issue with this is that when they click on the toggle, it doesn't execute the code in Visibility.Hidden and displays all rows including where related_tickets is blank. Is it possible to use the ToggleItem with an Expression?

Viewing 9 posts - 1 through 8 (of 8 total)

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