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

Force subreport onto separate page 1

Status
Not open for further replies.

Luvsql

Technical User
Apr 3, 2003
1,179
CA
I have a report which has multiple page headers set with a restriction pagenumber=TotalPageCount so that it won't print on the last page. I have a subreport in the RF, which when printed on its own takes a full page. What is happening is the Page headers on printing on the second last page and forcing the subreport to span 2 pages. Since it's doing this, the Page Headers on printing on the same page as the subreport as it's not considering it the last page anymore.

1. How do I force the subreport to print on the last page only of the report? I've tried the New page after and such on the GF to force the RF to be on a separate page number, but it's not working.
 
you can try using this for your suppression formula for the Page Header:
pagenumber=totalpagecount

it should suppress the page header only on the last page of the report.
 
This is the exact formula I already have for the page headers (see original post). My issue is because the RF is getting split into 2 pages, the last page, which only contains part of my subreport is the one getting the page headers suppressed. The report should really only by 7 pages in total, but because the RF (which has my subreport on it) is getting split into 2 pages, the report now has 8 total pages and page 8 is getting the page header suppressed.
 
what is causing your subreport to split into 2?
i thought, from your original post, that it was because of the page header.

You could add "OR pagenumber=totalpagecount-1" but then it would always suppress the header for the last 2 pages of the report, even if the subreport was only 1 page.

I think you could insert a 2nd instance of your subreport in a suppressed report header section, then use a shared variable to pass the # of pages in the subreport to the main report, then use the shared value in a suppression formula to hide the page header(s).
 
If you have "new page before" set on the RF, I think you can just suppress the page headers by using "on last record". This will work except if it is possible to have only one record on the last detail page. If this is possible, then there is another method that you can use. Let me know if that is the case.

-LB
 
If on PHa I put the suppression onlastrecord, it doesn't print on any page. if on PHd I added pagenumber=1 OR onlastrecord it also doesn't print on any page. I can only have 1 restriction ie the page headers print on every page except the last page.
 
Is the main report just a container report for several subs? Using onlastrecord as a suppression formula for the page headers should ONLY suppress them on or after the last record. Please post your suppression formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top