;; PRODUCT: ;; PRODUCT-ID: 9573e39c-e1a8-4310-8b7b-136d6d6cb2b6 ;; AUTHOR: TallyDeveloper ;;Modifies the "Gateway ofTally" menu and adds a new option "My Collection" [#Menu: GatewayOfTally] Add: Item: My Collection : Display: EmpList ;;Report definition [Report: EmpList] Add: Form: frmEmployee ;;Form definition [Form: frmEmployee] Add: Part: prtEmpPart ;;Part definition. It contians two lines viz "lnEmptitles" and "lnEmpLine" ;;The line "lnEmpLine" is repeated (displayed multiple times) it fetches data from Collection "MyEmps" ;;Scroll attribute provides a scrool bar [Part: prtEmpPart] Add: Lines: lnEmpTitles,lnEmpLine Repeat: lnEmpLine : MyEmps Scroll: Vertical Common Border : Yes [Line: lnEmptitles] Use: lnEmpLine Local : Field : FEmp Name : Set as : "Employee Name" Local : Field : FEmp BirthDate: Type: String Local : Field : FEmp BirthDate: Set as: "BirthDt" Local : Field : FEmp BirthYear: Type: String Local : Field : FEmp BirthYear: Set as: "Year" Local : Field : FEmp BirthMonth: Type: String Local : Field : FEmp BirthMonth: Set as: "Month" Local : Field : FEmp BirthDay: Type: String Local : Field : FEmp BirthDay: Set as: "Day" Local : Field : Default : Align : Centre Local : Field : Default : Style : Normal Bold Border : Thin Top Bottom [Line: lnEmpLine] Field: FEmp Name Right Fields: FEmp BirthDate, FEmp BirthYear, Femp BirthMonth, FEmp BirthDay [Field: FEmp Name] Type: String Set as: $EmpName Width : 30 Space left: 2 [Field: FEmp BirthDate] Type: Date Set as: $BirthDate Width : 12 Border : Thin Left Right [Field: Femp BirthYear] Type: Number Set as: $BirthYear Width: 5 Border: Thin Right [Field: Femp BirthMonth] Type: Number Set as: $BirthMonth Width: 5 Border: Thin Right [Field: FEmp BirthDay] Type: Number Set as: $BirthDay Width: 5 Border: Thin Right [Collection: MyEmps] Objects : Emp01, Emp02 ;;Global formula to get the Year from the Date ;;See the usage of Internal TDL date functions viz ;;1) $$YearofDate ;;2) $$MonthofDate ;;3) $$DayofDAte ;;================================================= [System: Formula] GetYearofDate: $$YearofDate:$BirthDate GetMonthofDate: $$MonthofDate:$BirthDate GetDayofDate: $$DayofDate:$BirthDate [Object: Emp01] EmpName: "Ajay" BirthDate: $$Date:"01/02/1982" BirthYear: @@GetYearofDate BirthMonth: @@GetMonthofDate BirthDay: @@GetDayofDate [Object: Emp02] EmpName: "Ramesh" BirthDate: $$Date:"16/05/1970" BirthYear: @@GetYearofDate BirthMonth: @@GetMonthofDate BirthDay: @@GetDayofDate