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

Subreport does not display, but will display by itself. Argh!

Status
Not open for further replies.

petelyons

Technical User
Apr 13, 2001
11
US
I have been sooooo frustrated with this nuance of some of my subreports not displaying whenever there is zero (er, null) records returned from said subreports' Count query.

My subreport design properties:

Report: Data: a simple Count query -may sometimes return nothing (er, null)

Hidden textbox: Data: =Sum([FieldAlias])
Hidden textbox: Name: Txt_Hidden_TTL

Visible textbox: Data: =IIf(IsError([Txt_Hidden_TTL]), "0", [Txt_Hidden_TTL])
Visible textbox: Name: Txt_Visible_TTL

All by itself, this subreport shows a nice pretty zero or a positive number without fail. But when I execute the main report, and if the IIf had placed the zero in the Visible textbox, the darn thing doesn't display at all - not even the darn label in the subreport will show! The subreport will only show itself in my main report if there is a positive number in the subreport's Visible textbox. What gives? :-I

P.S. I have already tried using IsNull, but that was still returning #Error. So that's why I'm using IsError instead. :)

Thanks,
Pete Lyons
activeserver@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top