subreport not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,

I have a report that is based on a table. works fine when i view it alone.
and there is a field with IIf([status] Is Null,"no data",[status]) as the
controlsource. works fine, and when there are no records to display, "no
data" is seen.

however, when the report is within a parent report, as a subreport, it
doesnt work fine, and you see nothing.

why?

thanks in advance,
geebee
 
geebee said:
I have a report that is based on a table. works fine when i view it alone.
and there is a field with IIf([status] Is Null,"no data",[status]) as the
controlsource. works fine, and when there are no records to display, "no
data" is seen.

however, when the report is within a parent report, as a subreport, it
doesnt work fine, and you see nothing.

why?


Unlike main reports that display something even when it has
no data, subreports with no data do not display anything.

The way to accomplish the effect you want is to add a text
box to the main report in the same section that contains the
subreport. Make sure you set it's BackStyle and BorderStyle
to Transparent. Then position it on top of the subreport
and use an expression like:
=IIf(subreportcontrolname.Report.HasData, Null, "No Data")
 
A subreport will not appear if there are no records returned in the
subreport.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top