Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Hiding Null value rows Expand / Collapse
Author
Message
Posted Thursday, November 18, 2010 9:49 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 10:22 AM
Points: 64, Visits: 252
Hello All,

I have 5 rows in a directory and when i output them i see a peculiar problem. Not all the rows always have values, some are null and they show as blank spaces.

Example:
DIRECTORY:

NAME1
ADD1
CITY1
STATE1
ZIP1

NAME2

CITY2
STATE2
ZIP2

NAME3
ADD3

STATE3
ZIP3

In the above example for the second listing of Name 2, Address 2 is missing and thus shows as a blank space. Is there any property is SSRS where i can specify if the field value is null then hide the row?

Thanks!

Post #1023022
Posted Thursday, November 18, 2010 10:02 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 13, 2013 4:35 AM
Points: 386, Visits: 211
Exclude it fom the dataset?



Cursors never.
DTS - only when needed and never to control.
Post #1023034
Posted Thursday, November 18, 2010 10:24 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 10:22 AM
Points: 64, Visits: 252
Hello Nigel,

Thanks for you reply, but what do you mean by exclude it from the data set. I was hoping there would be a visibility option where i can may be write an expression or may be there is setting which i can enable so if the value is null then it does not show in the output.

Thanks!
Post #1023041
Posted Thursday, November 18, 2010 10:36 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 10:22 AM
Points: 64, Visits: 252
To reiterate my example:
NAME1
ADD1
CITY1
STATE1
ZIP1

NAME2

CITY2
STATE2
ZIP2

NAME3
ADD3

STATE3
ZIP3


For this given example i want the rows in the output to show like this:
NAME1
ADD1
CITY1
STATE1
ZIP1

NAME2
CITY2
STATE2
ZIP2

NAME3
ADD3
STATE3
ZIP3

Thanks!
Post #1023049
Posted Sunday, November 21, 2010 7:45 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, November 21, 2010 7:58 PM
Points: 10, Visits: 32
You can set the Hidden property for that cell or datarow. Like.. if(Fields!SomeField.Value = "", true, false).
Post #1024124
Posted Monday, November 22, 2010 8:20 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, June 14, 2011 10:22 AM
Points: 64, Visits: 252
Hello SSRS Dev,

Thank you for your suggestion but the iif statement does not work in the Visibility expression. It still shows that empty cell.

Any other suggestions on how i can hide the empty cell??
Post #1024385
Posted Wednesday, June 01, 2011 12:08 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, April 14, 2014 11:55 AM
Points: 64, Visits: 47
Hi,

I have the same issue. I am able to put an IIF condition and hide the data for value = 0. However, instead of data, now report is displaying a blank row.

Is there any way i can turn off/hide that blank row as well??

Thanks in advance.
Anisha Nair
Post #1117882
Posted Wednesday, June 01, 2011 2:17 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 23, 2011 9:40 AM
Points: 212, Visits: 298
I just tested this as well and it worked fine for me. In SSRS 2005, first make sure you select the entire row, not just a single cell or textbox. In the properties pane expand Visibility and in the Hidden property create an expression. This is the expression I used utilizing AdventureWorks:

=IIF(IsNothing(Fields!AddressLine2.Value),True,False)

My entire address line 2 row was hidden and the rest of the text was collapsed togther.



Post #1118378
Posted Thursday, June 02, 2011 5:51 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, July 20, 2011 12:01 AM
Points: 36, Visits: 57
I have done it in my report. But it was on columns.

iif(Fields!abc.IsMissing,True,False)

If the field doesn't has data then the corresponding column was hided. leaving no traces. You have to try it on Visibility property of the column. You can try it.
Post #1118660
Posted Friday, July 15, 2011 10:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 07, 2013 12:49 PM
Points: 1, Visits: 8
sdvoranchik (6/1/2011)
I just tested this as well and it worked fine for me. In SSRS 2005, first make sure you select the entire row, not just a single cell or textbox. In the properties pane expand Visibility and in the Hidden property create an expression. This is the expression I used utilizing AdventureWorks:

=IIF(IsNothing(Fields!AddressLine2.Value),True,False)

My entire address line 2 row was hidden and the rest of the text was collapsed togther.
Post #1142601
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse