no data in subreport

  • Thread starter Thread starter Meryl
  • Start date Start date
M

Meryl

I have a report that has contact information for each family in our db
(separate page for each).

I have a subreport that lists all the emails for the family.

If there are no emails, I want to print "No emails on file".

I created a control box: =IIf([HasData],"YES ","No Email on File")
I put it in the detail section and nothing appears under either condition.

When I put it in the page footer for the subreport, the "Yes" appeared when
there was data, but #error appears when there is none. I can't figure out
what's wrong.
 
Meryl said:
I have a report that has contact information for each family in our db
(separate page for each).

I have a subreport that lists all the emails for the family.

If there are no emails, I want to print "No emails on file".

I created a control box: =IIf([HasData],"YES ","No Email on File")
I put it in the detail section and nothing appears under either condition.

When I put it in the page footer for the subreport, the "Yes" appeared when
there was data, but #error appears when there is none. I can't figure out
what's wrong.


Subreports with no data don't do anything so the text box
needs to be in the main report. (Try placing it on top of
the subreport control.) Set the text box's expression to
this kind of thing:
=IIf(subreportcontrol.HasData, "Yes". "No Email on File")

It seems like you would want to use "" instead of "Yes"??
 
You need to reference the subreport control name (might be the same as the
Source Object)

=IIf(srptCtlName.Report.[HasData],"YES ","No Email on File")
 
Back
Top