Dear Experts, Have made a Toggle Button to sort Report on Cond1 and Cond2........ It is working, however after pressing the button I have to refresh the TDL/Report. Any Ideas??? Why and How?
The code is as below: Also in Report I have set........... Set : SortChange : "SortDays" Code: [Variable : SortChange] Type : String Default : "SortName" Volatile : No [System : Variable] SortChange : SortName [Key : Sorting] Key : F4 Title : If ##SortChange = "SortDays" Then "Sort on Days" Else "Sort on Item" Action : Set : SortChange : If ##SortChange = "SortDays" Then "SortName" Else "SortDays"
Hi, i think you must be calling these values in your collection. Collection is referred to in reports/field. therefore you need to refresh. Sorry am not able to help. JD
Code: [Button: VFST Configure] Title : "Sorting" Key : F12 Action : Execute : VFST Configure [Report: VFST Configure] Auto : Yes Form : VFST Configure [Form: VFST Configure] No confirm : Yes Full width : No Full height : No Background : @@SV_CMPCONFIG Local : Style : Default : Height : @@SmallSize Local : Line : Form SubTitle : SpaceBottom : 0.5 Parts : VFST Sorting [Part: VFST Sorting] Lines : DSP Sorting In Collection Level Sort : <Sorting Name> : <Object Name> First Sort Name Should be use @@Default
Code: [Collection: Expiry] Use : ExpirySrc Compute : RemainingDays :($$Date:$Expiryperiod) - ($$Date:#SVToDate) Compute : GodownName : $GodownName Sort : @@Default : @@newsort [System : Formula] NewSort : If ##SortChange = "SortName" then $RemainingDays Else $Name [Variable : SortChange] Type : String Default : $$String:"SortName" Volatile : No [System : Variable] SortChange : "SortName" [Key : SortChange] Key : F5 Title : If ##SortChange = "SortDays" Then "Sort on Days" Else "Sort on Item" Action : Set : SortChange : If ##SortChange = "SortDays" Then "SortName" Else "SortDays" In Report level ---> Variable : SVSortMethod It does not work.......Is it because it is a toggle button? You example code is straight action type....mine is toggle.
I Say Like this. You can Set That Variable Value Based in Toggle Type Also. [Collection: Expiry] Use : ExpirySrc Compute : RemainingDays $$Date:$Expiryperiod) - ($$Date:#SVToDate) Compute : GodownName : $GodownName Sort : @@Default : $Name Sort : "Sort on Days" : $RemainingDays
Define the Variable in Report Level, and Set the Varaable with default load value if u do this, after this button will work fine
[Variable : SortChange] Type : String Default : "SortName" Volatile : No [System : Variable] SortChange : SortName [Key : Sorting] Key : F4 Title : If ##SortChange = "SortDays" Then "Sort on Days" Else "Sort on Item" Action : Set : SortChange : If ##SortChange = "SortDays" Then "SortName" Else "SortDays" ;;replace action with the following ACtion : Call : SortRefresh : ##SortChange [Function : SortRefresh] Parameter : SortString : String Variable : SortChange : String 01 : Set : SortChange : If ##SortString = "SortDays" Then "SortName" Else "SortDays" 02 : Refresh TDL 03 : Refresh Data
Thank you for your solution....but it did not work either....... Is there any way to write a function.... that after pressing F4 button...... the function gets called to refresh TDL and data. I saw similar function in Developer during making of another project TDL, but am unable to locate it or recollect it. I think Tally called it dummy condition to refresh data with new user input parameters. I will appreciate it. Thanks in advance.
A little bit of tweaking...... this worked........ Many thanks to all for your assistance. [Button : SortChange] Key : F5 Title : If ##SortChange = "SortDays" Then "Sort on Days" Else "Sort on Batches" Action : Call : SortRefresh [Function : SortRefresh] 01 : Set : SortChange : If ##SortChange = "SortDays" Then "SortName" Else "SortDays" 02 : Refresh TDL 03 : Refresh Data
Still cannot understand the logic......... I have 4 toggle buttons in this report......... Sorting on Name or Days Hide/Show Category Hide/Show Group Persishable and All Stocks All toggle works fine except the sorting. And why did it require a function to REFRESH?? Is it because this Condition was connected to a COLLECTION??
This also worked......... introduced a Dummy collection to refresh data. [Collection: Expiry] Use : ExpirySrc Compute : RemainingDays $$Date:$Expiryperiod) - ($$Date:#SVToDate) Compute : GodownName : $GodownName Filter : NonZeroClBal Sort : @@Default : @@NewSort Option : Dummyrefresh : ##SortChange OR NOT ##SortChange [!Collection : Dummyrefresh]