
/*
Objective(s) -
-	This code will teach how to repeat on accounting groups of a company and display the group name and closing balances
*/

[#Menu: Gateway of Tally]

	Add	: Item	: Before : @@locQuit	: My Trial Balance		: Display	: My Trial Balance
    
[Report: My Trial Balance]

    Form       	: My Trial Balance

[Form: My Trial Balance]

    Parts       : My Trial Balance Part
    Height      : 100% Page
    Width       : 100% Page
		
[Part: My Trial Balance Part]

    Lines       : My Trial Balance Title, My Trial Balance Details
    
    ;;The line repeats on the collection of accounting groups

    Repeat      : My Trial Balance Details	: My Trial Balance Groups
    Scroll      : Vertical
    CommonBorder: Yes
		
    [Line: My Trial Balance Title]
        
        Use     : My Trial Balance Details
        Local   : Field : Default           			: Type  : String
        Local   : Field : Default           			: Align : Centre		
        Local   : Field : My Trial Balance Name Field  	: Set as: "Particulars"
        Local   : Field : My Trial Balance Amount Field	: Set as: "Amount"
        Border  : Flush Totals

    [Line: My Trial Balance Details]

        Fields      : My Trial Balance Name Field
        Right Fields: My Trial Balance Amount Field
		
        [Field: My Trial Balance Name Field]

			Use         : Name Field
			Set as      : $Name             ;;;Accounting group name is displayed in the field

        [Field: My Trial Balance Amount Field]

            Use         : Amount Field
	    Set as      : $ClosingBalance    ;;;closing balances of the accounting groups are shown in the field
	    Border      : Thin Left
					
;;User defined collection of all the accounting group of the company

[Collection: My Trial Balance Groups]

;;Collection will contain all the groups of the company

    Type        : Group
    
;;all the groups are filtered whose closing balances are less than zero

        Filter      : Non Zero Closing Balance
	Fetch	    : Name, ClosingBalance
    
;;System formula is defined to filter closing balances greater than zero, this is utilized in collection as filter

[System: Formula]

	Non Zero Closing Balance   : $ClosingBalance > 0

;; End-of-File
