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

Subreports issue 1

Status
Not open for further replies.

problemman1

Technical User
Jun 2, 2010
9
0
0
KW
My question is:
As you know the page header is displayed at the end of every page of a report.
But when i add subreports to a blank report in the detail section in different subsections the page header behaves wierdly.
1.it is displayed as soon as the data gets over instead of displaying at the end of the page
2. and the page header and page footer displays only once in the whole report i.e it behaves like the report header and report footer.
Example for problem 1.if there are only 2 rows of data in one of the subreport the page header is displayed just after those 2 rows instead of displaying at the end of the page.
Example for problem 2. And if the report has more than 2 pages the page header is displayed only once in the beginning and the footer at the last page as soon as the data gets over.How can i solve this problem?

I got this answer but i did not understand:
SubReports do not have Page Header/Footers, only the Main Report has those sections. When you import an existing Main Report as a SubReport, its Page Headers/Footers are converted to Report Headers/Footers.

If you want different Page Headers/Footers per SubReport you will need to create multiple sections in the Main Report and suppress/show them according to which subreport is currently being printed.

Could some1 give me a solution plssss??????
 
Subreports don't have page headers or page footers. To create a fake page header, create a formula in the field explorer in the subreport that is true for all records:

whilereadingrecords;
""

Insert a group on this, check "repeat group header on each page," and make sure that this is your group #1. You can now use this section as your page header.

Page footers are harder to create within a sub, and it involves counting the number of records per page, inserting a detail_b section, and then conditionally suppressing it so that it shows only on the last record per page, so that it can then be used as a page footer.

A simpler way is to use a main report page footer section. You can conditionally show a main report page footer by following the technique used in thread149-1606262.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top