In the page footer I have the following...............
Shared BooleanVar TearOffPrinted; Local BooleanVar bSuppressThis; // set suppression state to whether we printed the tear off yet bSuppressThis := TearOffPrinted; // we can now set that the tear off has been printed TearOffPrinted := true; // return state of when we entered this footer (ie. did we print the tear off yet?) bSuppressThis;
However, upon testing it is apparent that if the Detail section spans more than one page the tear off section is also shown on the second page. If the detail band fits on just the one page, then all is well.
It's as if Crystal hasn't fully 'processed' the page footer until the Detail section is complete?!?!?!!?
I have created a sample illustrating the problem, so if you're up for a puzzle, reply as such and I'll send it to you.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 01 Apr 2009 at 6:23am
I am assuming that the code for the page footer is in the suppression code.
If the group header is printed on every page, that might be resetting the printed boolean. Since you never suppress the group header, you might move the code into a formula and drop that on the group header.
To suppress the false add a line to the formula that is ""...the formula just displays the empty string.
Joined: 23 Dec 2008
Online Status: Offline
Posts: 76
Posted: 02 Apr 2009 at 4:02am
No, the group header is not printed on each page, only at the tsrt of the group.
In my post I simplified the issue somewhat. In fact, the report in question has a number of subreports between the header and footer. With a simple example I can count the number of rows in the detail and set TearOffPrinted in a formula field. However, doing this in the report proper would be a lot of work and that's why I posted here.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 02 Apr 2009 at 6:09am
The only other idea that comes to mind is to have 1 shared variable and have each subreport add to it what their number of lines are. then you could have a formula to access this and tell the footer to print if it is less than some predefined and force a page break if needed.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum