Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Friday, September 9, 2011

Walk Collection

Here's a sample TDL program to get the Voucher details using the WALK COLLECTION statement.

;;Adds a new option to Gateway of Tally
[#Menu : Gateway of Tally]
    Add    : Item    : Before : @@locQuit    : Walk Collection - Example1      : Call    : MyWalkCollectionExample1    

;;This is a new Collection definition which is based on Tally Internal Object named Voucher which contains Voucher details
[Collection : MyVouchers]
    Type     : Voucher
    Fetch   : *, LedgerEntries.*

;;Function definition 
;;Displays the Voucher details
[Function : MyWalkCollectionExample1]
    00 : SET FILE LOG ON
    01 : LOG : "***************************"
    05 : WALK COLLECTION : MyVouchers
    10 :     LOG : $$String:$Date + "," + $VoucherTypeName + "," + $$String:($LedgerEntries[1].LedgerName) + "," + $$String:$LedgerEntries[1].Amount
    20 : END WALK
    90 : SET FILE LOG OFF
    100 : Exec Command        : Notepad     : "TDLFunc.Log"    

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.