Sub-Reports With No-Data

  • Thread starter Thread starter Dave Ruhl
  • Start date Start date
D

Dave Ruhl

Is there a way to get a sub-report to print the Report
Header even if there is a 'No Data' situation ? I'm
trying to use the Report_NoData Sub to make a message
label visible in this situation, but I still can't get
anything to show up on the main report. Can this be
done ?
 
You would need to add a text box (or boxes) with a control source like:
=IIf(srptMySub.Report.HasData,"","No Data In Subreport")
 
Thanks Duane, that does help. I was hoping to find a way
to get the sub-report Page Header to print in a No-Data
situation too, but it looks like the only way is to put
the header in the main report. The problem with that is
that if the sub-report does have data, the header doesn't
print after page 1. Access report capabilities sure
aren't as advanced as some other products :(
 
If you want "page" headers in a subreport.
1) add a primary sorting and grouping level
2) set the field/expression to =1
3) set its Group Header to Yes
4) set the Repeat Section property of the =1 Group Header to Yes
5) use this section as your Page header

Don't ever bad mouth Access reports again ;-). I doubt you will find a more
flexible, powerful, functional, easy to create reporting solution anywhere.

--
Duane Hookom
Microsoft Access MVP


Dave Ruhl said:
Thanks Duane, that does help. I was hoping to find a way
to get the sub-report Page Header to print in a No-Data
situation too, but it looks like the only way is to put
the header in the main report. The problem with that is
that if the sub-report does have data, the header doesn't
print after page 1. Access report capabilities sure
aren't as advanced as some other products :(
 
Back
Top