Skip to Content
author's profile photo Former Member
Former Member

How to use TotalPageCount

Post Author: drs

CA Forum: General

Hi,

I'm trying to use TotalPageCount in GroupHeader 's "New Page after" to determine if the total page count is even or odd.Based on that the report should generate blank page at the end.Here is the code:

TotalPageCount mod 2 =1

Can someone help

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 10:09 PM

    Post Author: SKodidine

    CA Forum: General

    Try this:

    In the group FOOTER, right click on it and then click on Section Expert. Under the Common tab, click on X-2 next to 'New Page After'. In the formula workshop window type:

    onlastrecord and remainder(totalpagecount,2) <> 0;

    Based on your previous post, this will insert a blank page if it is the last record and the totalpagecount is an odd number.

    P.S.: You might have to uncheck 'Keep Together' for the group footer and also conditionally suppress the page footer and report footer with the statement:

    OnLastRecord;

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 02:43 PM

    Post Author: drs

    CA Forum: General

    Thank you very much for replying as it is very urgent.

    1.I tried this code in Group Footer and unchecked the "Keep Together".

    I can see even total number of pages but i can not navigate to last blank page when the data actually ends by odd page count.

    2.I tried this code in Group Footer and unchecked the "Keep Together" and also conditionally suppressed report footer (this report subreport ,there is no page footer)with the statement:

    OnLastRecord;

    It's not generating even pages when it is odd.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2007 at 02:43 PM

    Post Author: drs

    CA Forum: General

    Thank you very much for replying as it is very urgent.

    1.I tried this code in Group Footer and unchecked the "Keep Together" for data which the report generates 3 pages.

    I can see even total number of pages means it shows 3 of 4 but i can not navigate to last blank page when the data actually ends by odd page count.

    And i exported this to PDF ,it generates only 3 pages.

    2.I tried this code in Group Footer and unchecked the "Keep Together" and also conditionally suppressed report footer (this report subreport ,there is no page footer)with the statement:

    OnLastRecord;

    It's not generating even pages when it is odd.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.