Dear All Please provide information on how to get report, part and line names from Tally Default Reports. e.g. I want to show total number of vouchers in Ledger Vouchers Report Tally Menu Display > Account Books > Ledger Starting Tally using /devmode option shows names of the fields but not the name of the line e.g. DSP MainDateTitle is a field in the top line. However, the name of the line is "LV Title" which is not displayed. I got this line name from a tdl available from the internet.
Dear Sir Thank you for your reply. I am attaching herewith the code . I am able to display Total Vouchers in the top row (where the ledger name and period of report is displayed). I want to show this in the bottom part on the left side in the row where Closing Balance or Current Total (debit and credit amounts) are displayed. Please help with the line and field name s to be used. Another thing is that total number of vouchers shown is only those vouchers where the first ledger entry of that voucher contains the selected ledger account. e.g. Entry like cash deposited into bank is counted in the display of cash ledger and is not counted in the display of bank ledger since in this entry (contra type - cash ledger is on the first line and bank ledger on the second line). Please help in this regard also. The Code is as follows - ; ------------------------------------ ;; Shree Ganeshay Namah ;; code to display the total number of vouchers ;; it is displayed in the top row ;; also correct total vouchers not displayed ;; please help ;; Since the line LV Title is system defined name of the line, it is preceded by #Line to modify its earlier definition [#Line : LV Title] Add : Field : After : LEDMailName : tmpnoofvoucherstitle Add : Field : After : tmpnoofvoucherstitle : tmpnoofvouchers [Field : tmpnoofvoucherstitle] Set as : "Total Vouchers : " Skip : Yes Width : 20 [Field : tmpnoofvouchers] Set as : $$NumItems:LedgerVouchersCollection Style : Normal Bold ;; This is a pre defined style so no definition required Skip : Yes Width : 5 [Collection : LedgerVouchersCollection] Type : Vouchers Walk : All Ledger Entries Filter: ledNameFilter [System: Formula] LedNameFilter : $LedgerName Equal To ##LedgerName ; -------------------------------------------------------------------------------------------------- There was an error while uploading the file. Therefore the code is pasted above
[Collection : LedgerVouchersCollection] Type : Vouchers 1. write Function [Function : GetTotalNoOfVouchers] Param : pLedgerName : String Returns : String Variable : vVchCnt : Number: 0 Varialbe : vLedCnt : Number 00: :set vVchCnt : 0 01 : Walk collection :LedgerVouchersCollection 02: set vLedCnt : 0 03 : Walk : All Ledger Entries 04 : If : $LedgerName = pLedgerName 05 : Set : vLedCnt : ##vLedCnt +1 06 : Set : vVchCnt: ##vVchCnt +##vLedCnt 06 : End Walk 07 : End Walk 08 : Return : ##vVchCnt ============================= 2. Remove Filter 3. Change Field Code as [Field : tmpnoofvouchers] Set as : $$GetTotalNoOfVouchers : ##LedgerName (this is your selected ledger Plz note this is not exact tested code.. plz run it and it should work with little corrections if any
Dear All Thank you for your replies It worked with the following modification [Field : tmpnoofvouchers] Set as : $$NumItems:vouchersofledger There is a default collection called vouchersofledger
Dear All Thank you for your support. I wanted to display the total number of vouchers in the line where total debit and credit amounts are displayed in the ledger view. It worked with the line [#Line: DSP VchCurTotalAmt] - This is the line name - as replied by Shri. Bipin Damania in post # 4 above.
But the same field is appearing in Group Vouchers Report also on the same line. (I think the name of the line is same). But now it is showing Total Vouchers : 0 (zero) as vouchers of ledger collection was used. Please help me how to distinguish the two reports when the line name is same and how to write conditional code based on the report name. My code for displaying the total number of vouchers is [#Line: DSP VchCurTotalAmt] Add : Left Field : tmpnoofvoucherstitle Add : Field : After : tmpnoofvoucherstitle : tmpnoofvouchers and [Field : tmpnoofvouchers] Set as : $$NumItems:vouchersofledger ;; $$NumItems is a system forumla vouchersofledger is a system collection Style : Normal Bold ;; This is a pre defined style so no definition required Skip : Yes But in the case of group vouchers, i have to use "vouchersofgroup " in set as line. How to put conditional code depending upon in which report the line is used ?