none
Row Visibilty won't hide blank lines RRS feed

  • Question

  • I am using SSRS 2008.  I have some rows in my resultset that are blank.  I set the row visibility to =iif(Fields!SomeRow.Value = "",TRUE,FALSE) and I set the toggle item to the row above it.  It still shows a blank line.  Has anyone else had trouble with this.  It works fine in ssrs 2005.

    Thanks for any help!

    Wednesday, March 2, 2011 11:42 PM

All replies

  • I wrote about the visibility flag somewhere before, and from memory:

    - You might find the visibility flag acts differently depending on whether you set it to true/false, or an expression that evaluates to true/false.
    - You might also find the above varies depending on whether you're looking at the report in the designer, explorer, and html/pdf.

    The way I get around blank rows in a data set is to add a filter to the table or group that checks to make sure one of the fields has a value in it; that way those rows won't show in that table at all. You can't check for NULL in filters, but you can get creative.

    Hope that helps.

    Thursday, March 3, 2011 2:36 AM
  • Hi Frustrated with SSRS,

     

    The thought of hide blank row through customized expression in row Visibility properties is right,  the root cause of blank rows still appears is that  you select a table row on the surface design and set the Visibility, but it doesn’t hide the actual table rows. Please follow the details as follows.

     

    1.      Click on the small triangle, which is locate in the lower right corner of the report design surface, and select “Advanced Mode” to show static members.

    2.      Select the “static” which represent the row that you want to hide when it is blank in the “Row Groups” pane which is in the left bottom to open properties window.

    3.       In the Properties, click the Hidden drop-down list from Visibility property, select <Expression…>.

    4.       Type in the expression:=Iif(Fields!SomeRow.Value = "",TRUE,FALSE).

     

    After you complete above steps, you could find that the blank rows are hidden.

     

    For more information about this ,please refer to the Robert’s profession blog:

    http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/report-design-shrinking-hidden-static-columns.aspx

     

    If you have any question, please feel free to ask.

     

    Thanks,

    Eileen Zhao

     

    Friday, March 4, 2011 5:40 AM
  • Thanks for the reply Cody but using a filter didn't work either.  Ultimately I want it to display correctly in excel.

    Friday, March 4, 2011 11:58 PM
  • Thanks for your reply Eileen.  Unfortunately I've already tried doing that.  It seems there are tons of places in ssrs to put in row visibility and I've tried them all, with no luck.

    Saturday, March 5, 2011 12:00 AM
  • Hi,

      Please write the expression for only hidden instead of writing iff loop.

    Please try the following expression in row visibility

    Fields!fieldname.value=""

     in the visibility expression

     

    Let me know it is working or not?

    Please mark as answer if it help you in getting answer.


    Thanks, Pranil Yambal | MCTS | Pranil.Yambal@hotmail.com
    Saturday, March 5, 2011 5:52 AM
  • Hi Frustrated with SSRS,

     

    I have tried to set the row visibility of my sample by your expression on SSRS 2008, there is an error disappears while preview the report: Input string was not in a correct format, so your expression is incorrect, you should alter this expression as: =Iif(IsNothing (Fields!SomeRow.Value),TRUE,FALSE). There are still many blank lines display in spite of using the correct expression in row visibility, it is not a correct approach to fix the issue, please use the following steps to see if it works for you.

     

    1. Right-click the “Details” in the “Row Groups” pane which is in the left bottom, select “Group Properties”.

    2. Select “Filters” on the left pane in the Group Properties dialog box.

    3. Click “Add” on the top of the right side to add a filter.

    4. Click “fx” to the right of the Expression text box.

    5. Type in the expression: =IsNothing(Fields!SomeRow.Value).

    6. Select “=” from the Operator drop-down list.

    7. Type in: =false in the value text box.

     

    After complete above steps, you will find all the blank lines do not show in the report and could display correctly in excel as well.

     

    If you have any question, please feel free to ask.

     

    Thanks,

    Eileen Zhao

    Wednesday, March 9, 2011 6:28 AM
  • Hi Eileen,

    Your suggestion did hide the blank line but the problem is it hides everything below it as well.  Below is an example of the structure of my report (I'll do my best to explain).

    group1 - Has values

    group2 - Has values

    group3 - Has values

    group4 - Sometimes has values

    group5 - Has values

    When group4 is null or blank I want that line to be hidden but I want group 5 to show and toggle with group3.  When group4 has a value I want it to show and toggle with group3.

    One thing I did try was to put my expression in row visibility for group4 and take off the toggle.  That hid the blank line but then of course when there is a value in group4 it doesn't toggle, it's always expanded.

    Hopefully that makes sense.   Thanks so much for your responses.

    Friday, March 11, 2011 4:17 PM
  • Hi,

    If you problem is resolved please post the method which you have used to resolve the isue.

    Thanks,

    Shobhit

    Sunday, March 13, 2011 7:14 AM
  • Hi,

    I am still struggling with this.  Just wondering if anyone had any other suggestions.

     

    Thanks!

    Monday, July 11, 2011 3:16 PM
  • Just throwing this out there, are the fields definitely "" and not a null, in which case it should be set visible on Is Not Nothing instead.

    Something I forgot to mention before with filters that might be relevant here, is that I don't do a check against the field name... but instead a [Count(FieldName)] > 0 (but in your case if they're empty strings... =Sum(IIf(Fields!fieldname.Value = "", 0, 1))). So you could try the filter again like that if you didn't the first time, or you could adjust the same expression in the visibility clause.

    The reason that I mention that I'm pretty sure I've used visibility as a psuedo-filter at times, and been tripped up by using a simple IIf and field name expression like yours, which has matched on the first entry in the group and shown stuff that I actually wanted to hide... whereas treating it like a group and summing for any occurrences of the specific value fixed things. It may or may not apply here.

    If you still can't get it running, I'd be happy to take a peek at the RDL (or a jury-rigged example RDL) with some dummy data.
    Wednesday, July 13, 2011 11:25 AM
  • Hi,

    Plese add following expression in the row visibilty property

    =Fields!SomeRow.Value==""

    In visiblity property we have to entered expression for hiding records. no iff loops required.


    Thanks, Pranil Yambal | MCTS | Pranil.Yambal@hotmail.com
    Friday, July 15, 2011 12:20 PM
  • Pranil, can you please post the verification link for your MCTS?

    It seems unbelievable that you can have one, when you jump into a discussion without providing a proper answer; nor seemingly even understand what it's about.


    Friday, July 15, 2011 12:40 PM
  • Thanks Cody.  Your filter suggestion is getting me so close.  In the rowgroup properties --> Filters I put in =Count(Fields!Group4.Value) = 0.  That hides the blank group, but it also hides the group below it.

    My report has 4 groups and a detail line.  The 4th group is sometimes blank, the detail group is never blank.  So, with this filter applied it hides group 4 when it's blank and it hides the detail line as well.  I want the detail line to still toggle even if group 4 is blank.

    Friday, August 26, 2011 4:04 PM
  • Can you move the detail line outside of the 4th group, as an adjacent group below? Or add an extra detail group that filters so it only shows when the 4th group disappears?
    Friday, August 26, 2011 4:32 PM
  • After searching half a day I came across this, and it solved my problem - Thank you.
    Thursday, May 8, 2014 11:05 PM