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

Conditional Page Breaking in CR8.5 based on PageNumber

Status
Not open for further replies.

HRoarke

Programmer
Apr 27, 2004
64
US
Requirement: under certain data conditions, produce a "This Page Intentionally blank" page so that when a group has broken, the next group starts on an odd-numbered page (this supports duplex printing).

Current approach (doesn't work): I have a sub-section of the relevant group footer that is conditionally suppressed based on the value of a boolean formula. The formula lives in the first sub-section of the group footer (this section is not suppressed). The formula examines the data conditions, and when they are all met AND (remainder(pagenumber, 2) = 0), the formula returns TRUE, otherwise FALSE. The conditional suppression logic on the sub-section is "{@myFormula}", and the NewPage[Before/After] conditional logic is "not {@myFormula}". Visually, the layout is:
-------------
...details...
----Grp Footer----
---GF-a---
...relevant subtotals, etc...
{@myFormula}
---GF-b---
"This Page Intentionally Blank"
Suppress Condition: {@myFormula}
NewPage[Before/After]: not {@myFormula}
----End Grp Footer----

Symptoms: The formula returns the correct result, e.g. TRUE when there should be a "blank" page produced and FALSE when there should be no "blank" page. However, the darned "This Page Intentionally Blank" sub-section is ALWAYS suppressed.

Worthless attempts at remedies: I have tried using global booleanvars (results in the same behavior), conditional Suppression only with NewPage[Before/After] checked, e.g. no conditions (this ALWAYS produces new pages before and after, but NEVER shows the "This Page Intentionally Blank" verbige) and several other kludgy methods, all to no avail.

Best Guess: My suspicion is that the boolean formula is re-evaluated iteratively when the NewPage[Before/After] kicks in since the PageNumber value changes, resulting in a circular looping (loopy?) situation, but this is only a guess.

Thanks in advance for any assistance or suggestions.

<bw>
 
In version 9 I would have done this :

in GFa
newPageAfter formula : not {@myformula}
and insert in this GF a formula field {@pageBreak} : whilePrintingRecords;
booleanVar pageBreak:=not {@myformula};

in GFb
Put the text 'BlankPage'
suppress section formula :
whilePrintingRecords;
booleanVar pageBreak;
not pageBreak;

Creat GFc , a new GF section
newPageBefore formula :
whilePrintingRecords;
booleanVar pageBreak;
pageBreak;
suppress section formula :
whilePrintingRecords;
booleanVar pageBreak;
not pageBreak;





--------------------------------------------------
[highlight]Django[/highlight] [thumbsup]
bug exterminator
tips'n tricks addict
 
Thanks for the suggestion. I'm trying this out - the exact approach outlined above doesn't work, but it is an interesting idea that I'll work with for a bit. If I can get it to work, I'll post the exact code.

Sorry in advance to any out there that actually like it, but Crystal is such a poor, poor, buggy, awful tool.....

<bw>
Software Architect
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top