PANTHEON™ manual

 Categories
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Collapse]Guide for PANTHEON
   [Collapse]Settings
    [Expand]Subjects
    [Expand]Items
    [Expand]POS
    [Expand]Manufacturing
    [Expand]Personnel
     Calendar
    [Expand]Financials
    [Expand]Customs
    [Collapse]Program
     [Expand]Document Types
     [Collapse]Reports in PANTHEON
       Settings in Administration Panel
      [Expand]Reports Register
       Print Preview
      [Expand]Report Designer
      [Expand]Creating Reports
      [Expand]Groups and Aggregates
      [Expand]Formatting and Highlighting
       Nested Reports (Subreports)
      [Expand]Specifics of Printouts in PANTHEON
      [Collapse]Script
        "Hello, World!" Script
        Using Variables, Database Fields, and Aggregate Functions
        Using Report Objects in the Script
        Events
        Example of Using the "OnBeforePrint" Event
        Printing a Group Sum in the Group Header
        Running Total
        "OnAfterData" Event
        Service Objects
        Using the "Engine" Object
       [Expand]PANTHEON Functions for FastReport
       [Expand]Examples with Tables and Queries
       Report Design Considerations
      Document Texts
      Delivery Methods
     [Expand]Loyalty Cards
     [Expand]Administration Panel
     [Expand]Dashboard Components
      Dashboard Reports
      Ad-hoc analysis
     [Expand]ARES
      SQL urejevalnik
    [Expand]Documentation
    [Expand]Change User
   [Expand]Orders
   [Expand]Goods
   [Expand]Manufacturing
   [Expand]POS
   [Expand]Service
   [Expand]Financials
   [Expand]Personnel
   [Expand]Analytics
   [Expand]Desktop
   [Expand]Help
   [Expand]Messages and Warnings
   [Expand]Additional programs
   [Expand]Old products
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Expand]User Manuals for PANTHEON
[Expand]PANTHEON Web
[Expand]PANTHEON Granules
[Expand]User Site

Load Time: 890.632 ms
print   |
Label

Data Bands

The running total (cumulative sum) represents sum of all data on the databand from the beginning of report or from the beginning of the band until the record which is currently displayed. In Pantheon we use running total for example for displaying stock quantity and value. It can be displayed in every row or only at the end.

Example of using running total is on report '18A - Record on Retail Sale and Purchase of Goods' that is in the program menu 'Goods | Invoice Issued Report | Commercial Records'.


  var
    nNabavaNeto, nSalePrice: Double;

...

  procedure DetailOnBeforePrint(Sender: TfrxComponent);
  begin
    if (<Line#> <> 1) or (<qReportIzpis."acKey"> <> '0000000000000') then
    begin
      nNabavaNeto := nNabavaNeto + <qReportIzpis."NabavaNeto">;
      nSalePrice  := nSalePrice  + <qReportIzpis."anSalePrice">;
    end;
  end;

...

begin
  nNabavaNeto := 0;
  nSalePrice := 0;
end.

Let's analize this example.

At the top of the code are declared variables  "nNabavaNeto" and "nSalePrice". They hold values in the period, defined by report criteria (without initial balance). Then on "OnBeforePrint" event values of purchase, receiving of goods and goods sales are added. Finally variables are displayed in the report summary.



Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!