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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide table with no records? 1

Status
Not open for further replies.

ainkca

Programmer
Aug 26, 2002
111
CA
Hi all,

I've got two data providers, the first one is a list of people, the second is detail about the same people in the first, but only when they've got certain records.

How can I show all the people, but only have the table appear for those who have detail?

Ie,

Joe Smith

Jane Smith

Jerry Smith
detail
detail
detail

Janet Smith

Jackie Smith
detail
detail

Jennifer Smith

Thanks for any help you can be, I must just be brain dead today, this seems too simple to be giving me grief.
 
try the function Numberofrows(dataprovider)

if Numberofrows(dataprovider)> 0 then display
else
don't

Hope this will help
 
Thanks for the suggestion, I did try it, but it doesn't work, it still is showing me the table for every person, it's just blank for those without data.

I've got the Hide box checked for the table, and the condition is
=(NumberOfRows(&quot;Query 2 with live&quot;)<0)

I'm thinking that maybe this isn't working because the whole of query 2 with live has more than 0 records... how could I specify the same, but based on the person ID?
 
Not sure how you have split the report up but you may be able to right-click on data and use 'format filter'..

just select values <> #EMPTY..

I have used this to filter blanks out..

Tony.
 
I don't think this is the right method. Use the hide block functionality. Create variable using the number of rows function and then check the value of the variable in the hide block area (Format Block). Steve Krandel
BASE Consulting Group
 
Yes, I was beginning to think that wasn't going to work. I am really having trouble here. I have been trying to use the Hide Block, but it's not working. It seems to be all or nothing, which indicates to me that my variable isn't right. I don't have the option to Format Block, just Format Table... is that what you meant?
 
I've got it now, what I did was put this as the formula for the Hide Block (under Format Table)

=IsNull(Count(<ObjectName> ))
With the Hide Block checked of course.

Thanks to all who responded, your suggestions led me to the solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top