dcsimg
Results 1 to 1 of 1

Thread: Reset Formula Value

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Posts
    675

    Reset Formula Value

    Hi

    How to reset formula value Amount,Debit,Credit to 0 on change of group . Secondly i want to print Amount & Dr_Cr variables value

    whileprintingrecords;
    CurrencyVar Amount;
    CurrencyVar Debit;
    CurrencyVar Credit;
    stringVar Dr_Cr;

    if {spGeneralLedger0;1.Dr_Cr} = "Cr" then
    Credit := Credit + {spGeneralLedger0;1.Credit} + {spGeneralLedger0;1.Balance};
    if {spGeneralLedger0;1.Dr_Cr} = "Dr" then
    Debit := Credit + {spGeneralLedger0;1.Debit} + {spGeneralLedger0;1.Balance};

    if Debit > Credit then
    Amount := Debit - Credit;
    if Debit < Credit then
    Amount := Credit - Debit;

    Thanks
    Last edited by Jagjit; Nov 23rd, 2019 at 02:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width