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

Group header not repeating when group footer is pushed to next page...

Status
Not open for further replies.

mattlscc

Programmer
Aug 23, 2007
14
US
I apologize in advance if this is a repeat topic, but I could not find it anywhere using the Keyword Search...

I am using Crystal Reports Version 11.5.8.939

I have a report with six groups... the basic layout idea is show below...
Code:
RH
  PH
    G1_HEADER
      G2_HEADER
        G3_HEADER
          G4_HEADER
            G5_HEADER
              G6_HEADER
                DETAIL A
                DETAIL B
              G6_FOOTER
            G5_FOOTER
          G4_FOOTER
            G4_a
            G4_b
        G3_FOOTER
      G2_FOOTER
    G1_FOOTER
  RF
PF

In Group 5 Footer (G5_FOOTER) I have a sub total of information from the details. In G4_a I have a grand total of all the sub totals from G5_FOOTER. In G4_b I have some lines for signatures that I only want displayed on the last page of the report at the bottom. So I have "Print at Bottom of Page" check in section expert for G4_b....and I have the following suppression formula for G4_b to make sure it doesn't print except on the last page...
Code:
     PageNumber <> TotalPageCount

I'm running into two problems... if all the details fit on the first page, and the sub total fits on the first page and the grand total fits on the first page... I will get my first problem.

[ol]
[li] The signature lines do not show up. The report actually has two pages although the TotalPageCount variable only thinks there is 1 page...so page two will say "Page 2 of 1". And Page 2 is blank except for the PH and PF sections. It appears like G4_b gets hidden / placed under the PF on page 1 for some unknown reason?[/li]


The second problem happens when all the details fit on the first page and the subtotal fits on the first page, but the grand total gets pushed to the second page.

[li]This time the signature lines show on the second page with the Grand Total, but the Group header 4 does not repeat on the second page (is it possibly because no details are on that page?). I need the group header to repeat on the second page... (Note: if the details are large enough to push the sub total section G5_FOOTER onto the second page, then G4_HEADER does repeat on the second page without needing details on that page)[/li]
[/ol]

I can't find a good solution to my problems. I need the signature lines to always show and if they need to go to the next page I need G4_HEADER to always repeat...not just when it feels convenient. Any help or advice with these problems would be greatly appreciated. Thanks!






 
In Design Mode on Grey section Right Click in GH4 and select Change Group.

On Options Tab - check Repeat group header on new page.

With regards other problem, make sure GFs 1, 2 and 3 are suppressed and not just closed up. They can sometimes still occupy space if not suppressed and cause a page throw.

Ian
 
I already had the "Repeat Group Header on New Page" option checked... that is the weird part... seems like a bug in Crystal Reports to me.

I also already had both the header and footer of groups 1, 2, and 3 suppressed... those groups do not display anything, just there for sorting purposes.

The way I have fixed this for now is I moved the contents of Group Header 4 into the Page Header (that way it is always displayed on top. I had to make sure I checked the "new page before" option in the section expert on Group Header 4 so the page header is always referencing only the one Group Header 4 data per page.

For the second issue, I placed an empty text box filled with spaces stretching the whole height of the group 4 footer section b... this helped crystal reports know when to wrap it to the next page or not.

I still don't like the way I had to put Group header 4 content in the page header...so please if anyone knows a better way to make sure it always displays on top of the page from within group header 4 let me know. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top