Results 1 to 6 of 6

Thread: Limit Records in Details

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    20

    Limit Records in Details

    i want to limit the records to 15 in every page, and get there running total to be display at the page footer;

    ex.
    header

    details section
    1.
    2.
    3.
    etc
    ----------------------------
    total here

    any clue on how to this?

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

    Re: Limit Records in Details

    Crystal Reports? Access? Data Reports? VB or .NET

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    20

    Re: Limit Records in Details

    hi again, well im using crystal XI and VB6, anyway i was able to do it
    by using a formula in details section, >>new page after<<

    its like this:

    recordnumber mod 15 = 0 <--- this will make it to have 15 records per page
    but my problem now is the running total, coz i want it to reset every page,
    im stuck with the running total ryt now...

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Limit Records in Details

    Meaning you want a sub total at the bottom of each page, and then a grand total on the last page?

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

    Re: Limit Records in Details

    I don't know about CR XI but in prior versions you would need to use a Global variable and write multiple formulas. You need to do it this way because your running total can only be calculated when the report is printing. A Running Total Field Object is normally calculated while reading the records.

    You will need to create 3 formulas. The samples use a Currency variable.

    1) PageTotalReset
    Resets the Global variable to 0. Place this formula in the PageHeader and Suppress it.

    Code:
    Global currencyVar curPageTotal := 0 ;
    WhilePrintingRecords;
    2) PageTotal
    Increases the value of the Global variable per record. Typically goes in the Details section and is suppressed.

    Code:
    Global currencyVar curPageTotal;
    WhilePrintingRecords;
    curPageTotal := curPageTotal + {TableName.FieldName}
    3) PageTotalDisplay
    Shows the value of the Global variable. Obviously place this formula in the PageFooter
    Code:
    Global currencyVar curPageTotal;
    WhilePrintingRecords;
    curPageTotal;

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    20

    Re: Limit Records in Details

    thanx guys, this solved my problem...

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