Group ledger colouring

Discussion in 'Tally Developer' started by Rakesh Kumar, Oct 5, 2020.

    
  1. Rakesh Kumar

    Rakesh Kumar Member


    Respected Sir, can we colour any group or sub group ledgers, if yes, please guide me a little bit
    to do this.

    Regards,

    Rakesh Sharma
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Since group name is generic, there has to be some identifiers. And hence dynamically not possible.

    But you can specify manually..... If Group contains "creditors" then "BLUE, if Group contains "Debtor" then "Red" and so on.............
     


  3. psr

    psr Member


    Sir, This is the code for individual Ledgers. Please guide on How to applying the same for Group Ledgers at Once.

    [#Field: DSP DispName]
    Color : @@NewCOL

    [#Field: DSP VchLedAccount]
    Color : @@NewCOL

    [Field : MyField]
    Use : Short Name Field
    Storage : MyColor
    Style : Small Bold
    Table : ColourColl
    [Collection : ColourColl]
    Title : "List Of Colour"
    List Name : "Blue","Yellow","Red"

    [System: Formulae]
    NewCOL : if $MyColor = "Blue" then "Blue" Else if $MyColor = "Red" then "Red" Else if $MyColor = "Yellow" then "Yellow" Else "Black"
     


  4. Himanshu-2002

    Himanshu-2002 Active Member


    The Code is very Clear and If you put Some Effort then surely You will achieve it without any help
     


  5. psr

    psr Member


    Should I have a Collection for Debotrs? or Should I write in System Formula If Group contains "creditors" then "BLUE, if Group contains "Debtor" then "Red" and so on.

    Please give example
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You have already been directed....read Post # 2 above...........use If condiion ...... if LedgerofGroup so n so...then blue, else this color.
     


  7. Himanshu-2002

    Himanshu-2002 Active Member


    You want to colour Group Or Sundry Debtors Ledger ?

    Example:

    Add a System Formula Where User Will Select Ledger Or Group Name
    Example:
    [Field: Example]
    Set As :mad:@MyFormula

    [System: Formula ]
    MyFormula : If $Ledger Contains "Pharma" Then "Blue" Else "Red"
     


  8. psr

    psr Member


    Thank you.

    With the help of sample files in Developer, I was able to get the form for user input ( Select Group and Select Color). However I am still not able to Set the Variable and Assign the selected input variable to the ledger color. I don't have idea about assigning the input variable to the field.

    [#Menu: Main Menu]
    Add: Top Button: At Beginning:SelectCGroup

    [Button: SelectCGroup]
    Key : F3
    Action : Modify Variable : ##SV LedgerColor

    [Report: SelectColorGroup]
    Use : Modify Variables
    Title : $$LocaleString:"Select Group"
    Local : Part : Modify Variables : Lines : Select Group, Select Color
    Local : Field: MV Title : Info : $$LocaleString:"Select Group"
    Variable: SV LedgerColor

    [Line: Select Group]
    Fields : Select Group Title, Select Group Info

    [Field: Select Group Title]
    Use : Medium Prompt
    Info : "Group Name"

    [Field: Select Group Info]
    Use : Name Field
    Table : Group
    Show Table : Always

    [Line: Select Color]
    Fields : Select Color Title, Select Color Info

    [Field: Select Color Title]
    Use : Medium Prompt
    Info : "Select Colour"

    [Field: Select Color Info]
    Use : Short Name Field
    Modifies : SV LedgerColor
    Table : ColourColl
    Show Table : Always


    [#Field: DSP DispName]
    Color : @@NewCOL

    [#Field: DSP VchLedAccount]
    set :Color : ##SV LedgerColor

    [System: Formula ]
    NewCOL : If $Group Contains "Sundry Debtors" Then "Blue" Else "Red"


    [Collection : ColourColl]
    Title : "List Of Colour"
    List Name : "Blue","Yellow","Red"


    [Variable : SV LedgerColor]
    Type : String
     


  9. Himanshu-2002

    Himanshu-2002 Active Member


    If You want to use Variable in Multiple Reports Like In this case...You have to use System Variable
    Example:
    [Variable: Var1]
    Type: String
    Default:""
    Persistent: Yes

    [System: Variable]
    Var1:""

    Now, You can use this variable in any Reports in tally and Remember to use persistent So, That tally remember this variable after Restart also
     


Share This Page