Results 1 to 3 of 3

Thread: RESET running total after each page

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2007
    Posts
    25

    RESET running total after each page

    Hi, i have a report in which i only need to display 20 records
    per page, how would i make my running totals to resets every page,
    ive tried using RESET---> Formula, but i just cant nail it there...
    any suggestion? please, and BTW how would you limit the records to a certain
    number? what i did is in the SECTION EXPERT---> after new page,
    ive inserted a formula something like this, [recordnumber mod 20 = 0]
    this works fine, but do you have any suggestion? thanks in advance

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: RESET running total after each page

    Which version of Crystal Reports (I am assuming you are using Crystal)?

    Using PageNumber Mod 20 = 0 is the best way to limit records/page that I have seen.

    To create "Page Totals" you need to use a global variable with 3 formulas. 1 formula to reset the global variable, 1 formula to add the value from the current record to the global variable and 1 formula to display the global variable.

    1) ResetPageTotal - put this formula in the Page Header section suppress/hide the object.
    WhilePrintingRecords;
    Global currencyVar PageTotal := 0;

    2) CalcPageTotal - put this formula in the Details section suppress/hide the object.
    WhilePrintingRecords;
    Global currencyVar PageTotal;
    PageTotal := PageTotal + {Order_Details.Amount};

    3) DisplayPageTotal - put this formula in the Page Footer section
    WhilePrintingRecords;
    Global currencyVar PageTotal;
    PageTotal;

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2007
    Posts
    25

    Re: RESET running total after each page

    Thank you, it works...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width