Need help on sorting a simple report. Simple list of Stock Item Name with two button to sort Desc and Ascending order. ;;---------------------------------------------------------------- ;;-------- Report Sorting Test ----------------------------------- ;----------------------------------------------------------------- [#Menu: Gateway of Tally] Item: Stock List Report : Display : MyStockList [Report: MyStockList] Form : MyStockList Variable : SortOrder [Form: MyStockList] Part: DSP MyTitle, DSP MyStockList Width : 100% Page Height : 100% Page Button : SortDec, SortAsc [Part: DSP MyTitle] Line : MyTitle [Line: MyTitle] Field : StkItem [Field: StkItem] Use : Simple Field Wdith : 100 Set as : "Stock Item Name, Sorting - " + $$String:##SortOrder Border : Thin Bottom [Part: DSP MyStockList] Line : MyItem Repeat : MyItem : ColStockItem Scroll : Vertical [Line: MyItem] Field : MyItemName [Field: MyItemName] Use : Simple Field Wdith : 100 Set as : $Name [Button: SortDec] Key : F5 Title : "Desc" Action : Set : SortOrder : 0 [Button: SortAsc] Key : F6 Title : "Asc" Action : Set : SortOrder : 1 [Collection: ColStockItem] Use : Stock Item Compute : SortColumn : ##SortOrder Sort : 0 : $Name Sort : 1 : -$Name [System: Variables] SortOrder : ($$SysName:NotApplicable) [Variable: SortOrder] Type : Number Volatile: Yes Default : 0
Instead of 2 buttons....make a toggle button............ Refer TDE...... and search for any of the TOGGLE buttons that you can find in Tally......... Study it and implement it.