Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Totalling by pre-determined number of records.

edited July 2001 in General
I need to create a report that loops through a record set and displays
summary data every X number of records, so if I had a dataset with 9
records, there would be 3 summary lines, for records 1-4, 5-8, and 9.

Any ideas? Thanks in advance.

Comments

  • edited July 2001
    Create a calcualted field in the dataset of type integer. In the
    OnCalcFields event, use:

    begin
    Table1GroupBreaker.AsInteger := (DataSet.RecNo- 1) div X;
    end;

    where X is the number of records you want to keep together.

    In the report, create a group based on the calculated field.

    HTH,
    Ed Dressel
    Team DM

This discussion has been closed.