I have a main report with a subreport in it which is many pages long. Putting the column labels for fields in the sub report makes those column labels show up once in the header of the subreport but does not repeat for each page of the main report containing the subreport data. If I put the column labels in the page header of the main report, they do show up on every page, whether or not the subreport data is actually in the page. For example, they show up on the cover page of the report and Page 2, which has other main report data and does not display the subreport data. How does one suppress or hide the labels so they only show up on pages with subreport data? I'm not sure whether or not this can be done in VBA code. Is there something that could be done in the OnFormat event to do this? Any help is much appreciated.
Column Names in Page Header of Report
Collapse
X
-
Tags: None
-
I think you can get what you are wanting by using a Group Header on your Sub Report with Repeat Section set to True.
If you have no Groups at all in your Sub-Report, you can set one up on an Expression like 1=1, then include Header for the Group, then Set Repeat Section to Yes in the Properties for the Group Header.
I'm sure that is clear as Mud, but I hope it helps. -
Try adding a header which is associated with the subreport data. Then, add the labels to that header section. I think that the labels will repeat on the pages in which the subreport covers because it is part of that section on the report. But, I am not sure.Comment
-
Page headings do not work well in subreports. My strategy is to add a level of grouping in the subreport by adding a literal "RptHdr" to the recordsource. Then I add a section header to the report based on the RptHdr field and set Repeat Section for that section to Yes. I put my subreports column headings (what would normally be in the page header area) into that section's header area. That takes care of my heading problems on subreports.
I probably learned that trick from somebody else here at Bytes.
Jim
Oops, sorry for the cross-post. Looks like we all have the same idea.Comment
-
Comment