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

Headers in Subqueries

Status
Not open for further replies.

jmcd2000

Programmer
Dec 16, 2003
11
GB
If no data is returned in a subreport the column headers within the reports are not printed - I wish to force them to be printed.

Is there anyway to do that in Access 2002??

Thanks.
 
You can move the column headers to the main report, placing them above the subreport. This way, they will print whether or not there is data....

Hoc nomen meum verum non est.
 
Thanks but I had already tried it that way - the problem is that if the subreport continues onto a second page the headers cannot be set to repeat.

Any ideas???
 
Is the subreport near the page header of the main report?? If it is you can put the column headers there...

Hoc nomen meum verum non est.
 
No, I can have 3/4 subreports per main report and they are not at the top of the main report.

I have found a way to check from the main report to see if the subreport has no data but then what to do!

 
Create a group in the subreport that is grouped on the value =1. This creates a dummy group. Move the column headers back to the subreport's new group header.

Suppress the report header of the subreport and use this group header as the report header. Because it's a group header, it has a Repeat Section property which you can set to Yes, and Access will repeat it at the top of each new page.


Hoc nomen meum verum non est.
 
Thanks again.
I had tried something similar with a group header - the problem seems to be of there is no data in the sub report it never goes into the sub report so controlling the headers within the sub report doesn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top