hi, i am using two buttons to run these two codes 1st code is Code: [#Report : Item Monthly Summary] Variable : vGreaterAmountss Local : Form : Default : Add : Button : Previous Months [Variable : vGreaterAmountss] Type : Logical [Button : Previous Months] Key : F8 action :Call:setreportdatess [Function:setreportdatess] 01:Set : SVFromDate : $$MonthStart:$$PrevMonth:##SVCurrentDate 02:Set : SVToDate :$$MonthEnd:$$PrevMonth:##SVCurrentDate 03:Return and 2nd code is Code: [#Report : Item Monthly Summary] Variable : vdDGreaterAmounts Local : Form : Default : Add : Button : Current MonthS [Variable : vdDGreaterAmounts] Type : Logical [Button : Current MonthS] Key : F9 action :Call:AsetreportdatesA [Function:AsetreportdatesA] 01:Set : SVFromDate : $$MonthStart:##SVCurrentDate 02:Set : SVToDate : $$MonthEnd:##SVCurrentDate i want to toggle them with one button, hope some one will help
tried many time, will you please explain more Code: [#Report : Purchase Register] Variable : vGreaterAmounty Local : Form : Default : Add : Button : SzhowOnly [Button : SzhowOnly] Key : alt + F8 Action : call : if ##vGreaterAmounty= "setreportdatesx" then "setreportdatesAx" else "setreportdatesx" [Variable : vGreaterAmounty] Type : Logical [Function:setreportdatesAx] 01:Set : SVFromDate : $$MonthStart:##SVCurrentDate 02:Set : SVToDate : $$MonthEnd:##SVCurrentDate [Function:setreportdatesx] 01:Set : SVFromDate : $$MonthStart:$$PrevMonth:##SVCurrentDate 02:Set : SVToDate :$$MonthEnd:$$PrevMonth:##SVCurrentDate thanks for the reply
thanks for the reply tried in this way, i thing i am still wrong Code: [#Report : Item Monthly Summary] [#Report : Item Monthly Summary] Variable : vdDGreaterAmounts Local : Form : Default : Add : Button : Current MonthS Local : Form : Default : Add : Button : CurrentzMonthS Local : Form : Default : Add : Button : Previous Months [Variable : vdDGreaterAmounts] Type : Logical [Button : Current MonthS] Key : F9 action :Call:AsetreportdatesA [Function:AsetreportdatesA] 01:Set : SVFromDate : $$MonthStart:##SVCurrentDate 02:Set : SVToDate : $$MonthEnd:##SVCurrentDate [Button : Previous Months] Key : F8 action :Call:setreportdatess [Function:setreportdatess] 01:Set : SVFromDate : $$MonthStart:$$PrevMonth:##SVCurrentDate 02:Set : SVToDate :$$MonthEnd:$$PrevMonth:##SVCurrentDate 03:Return [Button : CurrentzMonthS] Key : alt + F9 action list : Previous Months, Current MonthS
Code: [#Report : Item Monthly Summary] Variable : vdDGreaterAmounts Local : Form : Default : Add : Button : MonthToggle ;Local : Form : Default : Add : Button : CurrentzMonthS ;Local : Form : Default : Add : Button : Previous Months [Variable : vdDGreaterAmounts] Type : Logical [Variable : SetReportDate] Type : Logical [System : Variable] SetReportDate [Button : MonthToggle] Key : F9 Title : If NOT ##SetReportDate Then "Current Month" else "Previous Month" action : Call : AsetreportdatesA [Function : AsetreportdatesA] 01 : Set : SetReportDate : NOT ##SetReportDate 02 : If : ##SetReportDate 03 : Set : SVFromDate : $$MonthStart:##SVCurrentDate 04 : Set : SVToDate : $$MonthEnd:##SVCurrentDate 05 : Else 06 : Set : SVFromDate : $$MonthStart:$$PrevMonth:##SVCurrentDate 07 : Set : SVToDate : $$MonthEnd:$$PrevMonth:##SVCurrentDate 08 : EndIf