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

Suppress Group Header based on Different Group

Status
Not open for further replies.

RH610

Programmer
Aug 7, 2001
152
US
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
 
Group 2 header prints before the Group 4, so you're in twubble here...

You might use a subreport at the GHA section to return the count first, and then fire it again later...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top