I have a Crystal 8.5 report with 4 groups. I want to suppress the Group2 header based upon a count of how many lines print in the Group4 footer (the Group4 footer line prints if a certain condition holds true) (The groups are related in that Group 2 is for class name and Group 4 is students in that class).
I put a formula in the Group4 footer that increment a global variable whenever a line prints. I put a formula to suppress the Group2 header when that variable is zero. Problem is where to put the formula to initialize the variable to zero. If I put it in the Group2 header, it zeroes before the header can use the variable. If I put it in a "b" section of the Group2 header, it is not always zero, but has the wrong count because the header has already printed. If I put it anywhere below that, it is always zero when it gets to the Group2 header.
It's the cart after the horse problem. What I really need to do is run through a pass, get a count of the Group4 lines, THEN go back and decide whether to print the Group2 header based on that count, THEN print the Group4 lines, THEN zero the counter and move on. Any way to do this?
Thank You
I put a formula in the Group4 footer that increment a global variable whenever a line prints. I put a formula to suppress the Group2 header when that variable is zero. Problem is where to put the formula to initialize the variable to zero. If I put it in the Group2 header, it zeroes before the header can use the variable. If I put it in a "b" section of the Group2 header, it is not always zero, but has the wrong count because the header has already printed. If I put it anywhere below that, it is always zero when it gets to the Group2 header.
It's the cart after the horse problem. What I really need to do is run through a pass, get a count of the Group4 lines, THEN go back and decide whether to print the Group2 header based on that count, THEN print the Group4 lines, THEN zero the counter and move on. Any way to do this?
Thank You