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"