on 02-16-2011 5:30 AM
All my report data is contained within a single section in Group Footer 3A, (with "Keep Together" ticked in the Section Expert) so that a single record will never be broken across a page break.
In Section Group Footer 3B I have empty space. In a printed report, this is space for handwritten comments. Because it is a separate section, the page break may occur between Section 3A and section 3B. In this case, I want to suppress Section 3B when it is at the top of a page.
In Group Footer 3A, I used a formula called setPreviousPageNumber to store the page number that section 3A is printed within:
//setPreviousPageNumber
Global Numbervar previousPageNumber := PageNumber;
* After the initial post, I also tried putting setPreviousPageNumber in the Page Footer Section
Then in Group Footer 3B I set a conditional suppression formula:
//Conditional Suppression for Group Footer 3B
previousPageNumber <> PageNumber;
My reasoning was that Section 3A would be on (for example) PageNumber 4, and if Section 3B was on PageNumber 5, then suppress it.
However I find my formula to setPreviousPageNumber in Section 3A results in a strange anomaly.
The formula in 3A sets the variable previousPageNumber to be (for example) 4.
When I use a formula to display the value of previousPageNumber in3B, it has mysteriously already incremented to 5.
//printPreviousPageNumber
WhilePrintingRecords;
Global Numbervar previousPageNumber;
All these formulas are whileprintingrecords;
I have tried displaying both the PreviousPageNumber and the CurrentPageNumber in section 3B, and can see they are different. However, whenever I try to perform the comparison inside the Section Expert, I never get the result I want. Either the section is never suppressed, or it is always suppressed.
Does anyone have some insight on how I can suppress a section based on the page number of the previous section?
I'm using Crystal Reports 11.0.0.1282
Edited by: bradfisher on Feb 16, 2011 6:31 AM
upgrade to CR XI R2 for free and use your XI keycode to install and test again. Repost if it's still a problem:
http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.