;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* - This program illustrates the use of following attributes of Line DMPMode Fixed Height Line Remove Empty Right Field Select Space Bottom Space Top Skip Rows Full Object Option Switch About this program - The following report generates the ledgerwise closing balance with total line. - Has provision to configure showing totals line and show ledgers with closing balances above an amount - When exported in xml or json format, full object of ledger is exported */ [#Menu: Gateway of Tally] Add: Item: ($$LocaleString:"Ledger Details"): Display: TSPL Ledger Rep [Report: TSPL Ledger Rep] Form : TSPL Ledger Rep Title : ($$LocaleString:"Ledger Details") Set : TSPLLedgerValue : If ##TSPLLedgerValue = $$AsAmount:0 then $$AsAmount:0 else ##TSPLLedgerValue Set : TSPLShowTotals : If $$IsEmpty:##TSPLShowTotals then Yes else ##TSPLShowTotals Set : TSPLShowBorders : If $$IsEmpty:##TSPLShowBorders then No else ##TSPLShowBorders Set : TSPLHeight : If $$IsEmpty:##TSPLHeight then 1 else ##TSPLHeight [Form: TSPL Ledger Rep] Parts : TSPL Ledger Rep Button : ExplodeFlag Bottom Button : TSPL Configure Report ;;You can select lines in report and remove them from the report Key : Form Remove Line Width : 100% Screen Height : 100% Screen [Part: TSPL Ledger Rep] Lines : TSPL Ledger Rep Title, TSPL Ledger Rep Details, TSPL Ledger Rep Total Repeat : TSPL Ledger Rep Details : TSPL Ledger Coll Total : TSPL Ledger Closing Scroll : Vertical CommonBorder: Yes [Line: TSPL Ledger Rep Title] Fields : TSPL Ledger Rep Name Right Field : TSPL Ledger Closing Local : Field : Default : Type : String Local : Field : Default : Align : Center Local : Field : TSPL Ledger Rep Name : Set as : $$LocaleString:"Particulars" Local : Field : TSPL Ledger Rep Name : Widespaced: Yes Local : Field : TSPL Ledger Closing : Set as : $$LocaleString:"Closing Balance" ;; Border is drawn on the top and bottom of the line Border : Thin Top Bottom ;; Space of 0.5 is left on top and bottom of the line Space Bottom: 0.5 Space Top : 0.5 Excel Add Row: No [Line: TSPL Ledger Rep Details] Line : TSPL Ledger RepName, TSPL LedgerParent ;; Exports the full ledger object associated with each line in XML & JSON export Full Object : Yes Belongs To : Yes [Line: TSPL Ledger RepName] Fields : TSPL Ledger Rep Name Right Field : TSPL Ledger Closing ;; Line height is set at 1.5 Height : 1.5 ;; Specifies the Dot Matrix Print mode as "Draft" when using DMP printers. DMPMode : Draft ;; Lines lesser than configured closing balance is removed. Totals reflect the removal Empty if : $ClosingBalance < ##TSPLLedgerValue ;; In excel export 1 row is left empty before each line Skip Rows : 1 ;; When show borders is enabled in the configuration, this option is applied Option : TSPL Add Border : ##TSPLShowBorders ;; Based on the configuration, line height is picked from the switch statements Switch : Case Height : TSPLHeight1 : ##TSPLHeight = 1 Switch : Case Height : TSPLHeight2 : ##TSPLHeight = 2 [!Line: TSPLHeight1] Height : 1 [!Line: TSPLHeight2] Height : 2 [!Line: TSPL Add Border] Border : Thin Bottom [Field: TSPL Ledger Rep Name] Use : Name Field Set as : $Name [Field: TSPL Ledger Closing] Use : Amount Forex Field Set as : $ClosingBalance Format : "NoZero, DrCr" Border : Thin Left [Line: TSPL LedgerParent] Field : TSPL LedgerParent ;; This line cannot be selected Selectable : No Indent : 1 [Field: TSPL LedgerParent] Use : NameField Set as: "Parent: "+ $Parent Style : Small Italic ;;This Line comes right after scroll ends for the repeated line, and cursor doesnt go on this line [Line: TSPL Ledger Rep Total] Field : MediumPrompt Right Field : TSPL Ledger Closing Total Local : Field: Medium Prompt : Info : $$LocaleString:"Totals" Local : Field: Medium Prompt : Align: Right ;; Cursor doesnt not go on this line Fixed : Yes ;; The Totals line is removed based on configuration Remove if : NOT ##TSPLShowTotals Border : Totals [Field: TSPL Ledger Closing Total] Use : Amount Forex Field Set as : $$Total:TSPLLedgerClosing Format : "NoZero, DrCr" Border : Thin Left [Collection: TSPL Ledger Coll] Type : Ledger Fetch : Name, ClosingBalance [Button: TSPL Configure Report] Title : $$LocaleString:"Configure" Key : Alt+1 Action : Modify Variables: TSPL Report Config [Report: TSPL Report Config] Auto : Yes [Form: TSPL Report Config] Part : TSPL Report Config [Part: TSPL Report Config] Line: TSPL Show Totals, TSPL Ledger Value, TSPL Borders, TSPL Height [Line: TSPL Show Totals] Field: Long Prompt, TSPL Show Totals Local: Field : Long Prompt : Info : $$LocaleString:"Show Totals" [Field: TSPL Show Totals] Use : Logical Field Set as : if $$IsEmpty:##TSPLShowTotals then yes else ##TSPLShowTotals Set Always : Yes ;; This variable is used to remove if condition of the Totals line Modifies : TSPL Show Totals [Line: TSPL Ledger Value] Field: Long Prompt, TSPL Ledger Value Local: Field : Long Prompt : Info : $$LocaleString:"Show Ledgers with Closing Balance above" [Field: TSPL Ledger Value] Use : Amount Field Set as : ##TSPLLedgerValue Delete : Format Add : Format : "DrCr, Symbol," + ##ShowForex Set Always : Yes ;; This variable is used in empty if condition in the details line where line with closing balance below this value is emptied Modifies : TSPLLedgerValue [Line: TSPL Borders] Field: Long Prompt, TSPL Borders Local: Field : Long Prompt : Info : $$LocaleString:"Add Borders" [Field: TSPL Borders] Use : Logical Field Set as : if $$IsEmpty:##TSPLShowBorders then yes else ##TSPLShowBorders Set Always : Yes ;; This variable is used add borders to details line Modifies : TSPL Show Borders [Line: TSPL Height] Field: Long Prompt, TSPL Height Local: Field : Long Prompt : Info : $$LocaleString:"Height of Lines" [Field: TSPL Height] Use : Number Field Set as : if $$IsEmpty:##TSPLHeight then No else ##TSPLHeight Set Always : Yes Table : TSPL Height Show Table : Always ;; This variable is used to specify the height of the details line Modifies : TSPL Height ;;System variables used in the configuration report [System: Variable] Variable: TSPLShowTotals : Logical Variable: TSPLLedgerValue : Amount Variable: TSPL Show Borders : Logical Variable: TSPL Height : Long ;; To provide options as table for height [Collection: TSPL Height] List Name: "1","2" ;;End Of File