Search code examples
fastreport

FastReport 4 Current page sum


I am using FastReport with Delphi. Now, I need to display sum value of each page. I mean, I need sum value for current page on each page of the report.

How can I achieve that? Thanks


Solution

  • Solution:

    You can use "Page Footer" band and "Text" object with SUM() function for that purpose.

    Steps to follow:

    • put a PageFooter band (TfrxPageFooter) on you report page
    • put a memo (TfrxMemoView) on that band
    • set [SUM(<reportdataset."NumericColumn">, MasterData1)] as text, if you want to sum records only on current page
    • set [SUM(<reportdataset."NumericColumn">, MasterData1, 2)] as text, if you want to sum records from current page and previous pages.

    Notes:

    You can use "Report Summary" band if you want to show aggregate information after all rows of your report.