Crystal Reports How do I suppress all pages except report footer when page number is being reset by group?

Posted on 2011-05-10
Last Modified: 2012-06-22
Crystal Reports XI
 I have a report in which I would like to suppress all sections except for the Report Footer on the last page.  The report footer consists of summary totals.  The report itself consists of a mailable letter that can be 1 or more pages (successive pages are different than the first page of each group).  It is grouped by CompanyID and the page number is being reset (intentionally) after every group change.  

I have checked numerous posts and have not yet found one that helps me.  Since I am already conditionally suppressing page 1 or page 2 of letter, I would need something that would work in tandem with this suppression.  

Thank you in advance for your help!
Question by:mctwftech
    LVL 100

    Expert Comment

    I don't follow what you want.

    If you want all sections suppressed just suppress them.

    LVL 2

    Expert Comment

    What would you like to show and what not?

    You can supress all sections except report footer or do you mean all page footer except the last page?
    Then go to the section expert > page footer, tab the supress tab and press the X-2 button next to supress and enter "Not OnLastRecord"

    If this doesn't help please clarify yourself.

    Author Comment

    What I need to do is suppress everything but the report footer when I print the last page of the report.  OnLastRecord suppresses pageheader a on the last record also which in this case is also the page before the report footer.  

    Page header a;  I suppress when PageNumber > 1
    Page Header b: I supress when PageNumber = 1

    When I added the report Footer (to be only printed at the end), it prints on a new page but PageHeader A (which is a letter form) also prints with the Footer with the same data as the page before.

    I can't use Total pages because I reset the page number with the group.

    Does this help at all?
    LVL 2

    Accepted Solution

    I think I got something for you.

    make the following formula called "footer":

    global numbervar rank; 
    global numbervar rank2; 
    global numbervar rank3; 
    rank2 := rank ;
    rank := rank + 1;
    if OnLastRecord then rank := rank + 1000;
    rank3 := rank-rank2;

    Open in new window

    then add in your section expert the supress variables like:
    Page Header b: I supress when PageNumber = 1 or {@footer} > 1

    Hope this helps!

    Author Comment

    jdq556, you are a genius.  Works like a charm.  

    Author Closing Comment

    thank you so much.  You are a genius!   Works like a charm!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now