Run two Code with one button

Discussion in 'Requests' started by HAROON2015, Sep 20, 2019.

    
  1. HAROON2015

    HAROON2015 Member


    hi,
    i added two button of my report Purchase Register
    1st button
    Code:
    [#Reeport    : Purchase Register]
        Variable : vGreaterAmounts
        Local    : Form : Default : Adsd : Button : Previous Month
    [Variable : vGresaterAmounts]
        Type  : Logical
    [Button         : Previous Month]
        Key         : F8
        ;;Action      : Set : SVFromDate :'01-08-2019'
    action :Set      : SVFromDate          : $$MonthStart:##SVCurrentDsate -31
    2nd code
    Code:
    [#Reeport    : Purchase Register]
        Variable : vGreaterAmountsss
        Local    : Form : Default : Add : Button : Previous Monthaa
    [Variable : vGreaterAmountss]
        Type  : Logical
    [Button         : Previous Monthasa]
        Key         : F9
      ;;Action      : Set : SVToDate :'30-08-2019'
    action : Set      : SVTosDate            : $$MonthEnd:##SVCurrentDate -31

    how to run both code with one button
    hoop some one will help
     
    Last edited: Sep 20, 2019


  2. teja varma

    teja varma Active Member


    Code:
    [#Report    : Purchase Register]
        Variable : vGreaterAmounts
        Local    : Form : Default : Add : Button : Previous Month
    [Variable : vGreaterAmounts]
        Type  : Logical
    [Button         : Previous Month]
        Key         : F8
        action :Call:setreportdates
    
    
    
    [Function:setreportdates]
        01:Set      : SVFromDate          : $$MonthStart:##SVCurrentDate -31
        02:Set      : SVToDate            : $$MonthEnd:##SVCurrentDate -31
        03:Return
     
    HAROON2015 likes this.


  3. HAROON2015

    HAROON2015 Member


    very very big thanks to you
    may god bless you
     


  4. nasir

    nasir Member


    hi teeja verma
    can u help me ragarding one code plz i want to fetch data from notes field form ledger master can u help ma plzzz see the screen shoots
     

    Attached Files:



  5. teja varma

    teja varma Active Member


    the method to get the notes :
    $Narration:ledger:$LedgerName

    post your code to understand properly
     


  6. prabhu

    prabhu New Member



  7. prabhu

    prabhu New Member


    To Tdl experts

    I have created report like daybook , I want Dr & Cr Ledger Name filtered accordingly , and after the amount value of Dr should be (+) and Cr should be (-)
    I'm attaching sample snap short screen ...
    Please help me .....
     

    Attached Files:



  8. Rohit Khedar

    Rohit Khedar Member


    Mr.teja varma# plz solv its my not work

    [#Button: Change Configuration]

    Key : F12
    ;Action : Menu : Configuration ;; I want Open when I set Value No
    ;Action : Alter : RTC TDLReport ;; I want Open when I set Value Yes

    Title : $$LocaleString:"Configure"
    Action : CALL : RTC TDL Config

    [Function: RTC TDL Config]

    01: If: NOT $RTCEnable:$$Value
    02: Menu : Configuration
    03: Else

    04: If: $RTCEnable:$$Value
    05: Alter : RTC TDLReport

    06: End If

    07: End If
     


  9. Rohit Khedar

    Rohit Khedar Member


    any exper solv my above code problm
     


  10. teja varma

    teja varma Active Member


    what is $RTCEnable where did you define the UDF for that method
    post the complete code for evaluation
     


  11. Rohit Khedar

    Rohit Khedar Member


    hear i want open by password on "Menu : Configuration "
    [#Part: CMP TallyShopFeatures Left]
    Line : RTC TDL Enable, RTC TDL Pass

    [Line: RTC TDL Enable]
    Field : Long Prompt, Logical Field
    Local : Field : Long Prompt : Set as : "Enable TDL Security ?"
    Local : Field : Logical Field : Storage : RTCEnable
    [Line: RTC TDL Pass]
    Field : Long Prompt, RTC TDL Password
    Local : Field : Long Prompt : Set as : "Set Password to Open TDL Configuration :"
    Local : Field : Long Prompt : Indent : 2
    ;Local : Field : Names Field : Storage : RTCPassword
    ;Local : Field : Names Field : Width : 10
    ;Local : Field : Names Field : Validate : NOT $$IsEmpty:$$Value
    Local : Field : Default : Inactive : NOT $RTCEnable

    Space Top : .2
    [Field: RTC TDL Password]
    Use : Name Field
    Case : Normal
    Storage : RTCPassword
    Width : 10
    Set Always: Yes
    Maximum : 20
    Validate : NOT $$IsEmpty:$$Value
    ASCIIOnly : Yes
    [System: UDF]
    RTCEnable : Logical : 1001
    RTCPassword : String : 1002
    [#Button: Change Configuration]
    Key : F12
    ;Action : Menu : Configuration ;; I want Open when Value No
    ;Action : Alter : RTC TDLReport ;; I want Open when Value Yes
    Title : $$LocaleString:"Configure"
    Action : CALL : RTC TDL Config
    [Function: RTC TDL Config]

    01: If: NOT $RTCEnable:$$Value
    02: Menu : Configuration
    03: Else

    04: If: $RTCEnable:$$Value
    05: Alter : RTC TDLReport
    06: End If

    07: End If

    [Report: RTC TDLReport]
    Title: $$LocaleString:"Enter Password for TDL Configuration"
    Form: RTC TDLForm
    Object: COmpany
    [Form: RTC TDLForm]
    Part:RTC TDLPart

    Horizontal Align: Centre
    Vertical Align : Centre
    Full Width : No
    No confirm : Yes
    Space Top : 0.2
    Space Bottom : 1
    SpaceLeft : 1
    SpaceRight : 1
    Background : @@SV_ADDONS ;@@SV_CMPCONFIG
    Option : Small Size Form
    [Part: RTC TDLPart]
    Line: RTC TDLsubTit, RTC TDLUserTit, RTC TDLPassTit

    [Line: RTC TDLsubTit]
    Field : Form SubTitle

    Local: Field: Form SubTitle: Info: $$LocaleString:"Lock / Unlock TDL Configuration"
    Local: Field: Form SubTitle: Style : Normal Bold Italic
    Local: Field: Form SubTitle: Color : " Blue "
    Space Top : 0.2
    Space Bottom: 1
    [Line: RTC TDLUserTit]
    Field: Short Prompt, RTC TDLUserField

    Local: Field: Short Prompt : Set as : "User Name"
    Local: Field: Default : Width : 15
    Local: Field: Default : Style : Normal Bold Italic
    [Field: RTC TDLUserField]
    Use: Name Field

    Set as : $$cmpusername:Company:##SVCurrentCompany ;; this not proper work
    ;Set as :$OwnerName:Company:##SVCurrentCompany

    Skip : Yes

    [Line: RTC TDLPassTit]
    Field: Short Prompt, RTC TDLPasswordField

    Local: Field: Short Prompt : Set as : "Password"
    Local: Field: Default : Width : 15
    Local: Field: Default : Style : Normal Bold Italic
    Space Top : 0.5
    [Field: RTC TDLPasswordField]
    Use : Name Field
    Case : Normal
    Storage : #RTCPassword
    Set Always: Yes
    Maximum : 20
    Validate : NOT $$IsEmpty:$$Value
    ASCIIOnly : Yes
    Sub Menu: Configuration:$$Value= #RTCPassword
     


Share This Page