How do we achieve page totals in each page while printing a report?

Discussion in 'Knowledge Base' started by admin, Mar 22, 2015.

         
  1. admin

    admin Administrator Staff Member


    Closing and Opening Page Totals for Reports can be achieved using Part level Page Breaks.

    Example:-

    Consider a Trial Balance Report of a company, where we may require the running page totals to
    be printed at the end and beginning of each page.

    [Part: My Trial Balance]
    Page Break : Cl Page Break, Op Page Break
    ;; where both Cl Page Break and Op Page Break are Lines
    Total : DrAmtFld, CrAmtFld, NetAmtFld;; Declaring the Fields for whom Total needs to be accumulated
    [Line: Cl Page Break]
    Use : Detail Line
    Local: Field: Particulars Fld : Set As: “Carried Forward”
    Local: Field: DrAmt Fld : Set As: $$Total:DrAmtFld
    Local: Field: CrAmt Fld : Set As: $$Total:CrAmtFld
    Local: Field: NetAmt Fld : Set As: $$Total:NetAmtFld Border : Full Thin Top

    [Line: Op Page Break]
    Use : Cl Page Break
    Local: Field: Particulars Fld: Set As: “Brought Forward”

    In the above example,


    1. Part Attribute Page Break declares the Closing and Opening Page Break Lines to be used.
    2. Part Attribute Total declares the required Fields for which Totals needs to be accumulated.
    3. The Line Cl Page Break uses the pre-defined Detail Line and the relevant fields are locally modified to set the respective Totals using Function Total.
    4. The Line Op Page Break uses the defined line Cl Page Break and locally modifies only the particulars Field to set Brought Forward instead of Carried Forward.
     
    Ras Raj likes this.


Share This Page