Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide a row when field IS NULL

Status
Not open for further replies.

ousoonerjoe

Programmer
Jun 12, 2007
925
US
I am using the table control to display the results from my dataset. How do you hide a row from display if a field is null?

Any thoughts or comments are appreciated. Thank you.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
Found my own answer.

I was adjusting the "Group Settings" rather than just that individual Row's "Hidden' value.

Are there any limitations involving the Hidden property on a table and using expressions? I have 11 detail rows and only need the first row to always display. All others will be based on if a field is Null or not. I can get 2 rows to work properly like this, but all rows afterwards cause the following error:

Object reference not set to an instance of an object.

Code:
I have the row's Hidden property set to:
=IIF(Fields!Acct3.Value > 0, FALSE, TRUE)

Line in SELECT statement:
[Acct3] = CASE WHEN LEN(a.aptrn_acct3) = 0 THEN 0 ELSE a.aptrn_acct3 END
This works for the first 2 Acct fields, but not for any after that. Any help is appreciated.



"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
SOLUTION:

Was able to fumble my way through it. Instead of adding rows, i added a new group and placed all the rows in that group. Then each row was given the snip-it shown above and now all works as expected.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top