Ledger Color

Discussion in 'Tally Developer' started by psr, Feb 26, 2019.

    
  1. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Read again...... u need to target field specific to the report to make it work..........
     


  2. Jenny

    Jenny Active Member


    Its working but if i add more than 12 colors in system formula its showing error
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    there is no such limit.... there must be spell error or lack of "else" or something in the formula...

    there is no limit to number of conditions in the formula
     


  4. Jenny

    Jenny Active Member


    there is no spell error.....u saying lack of "else"....how to solve....is there any method ?
     


  5. hprahul

    hprahul Member



    If there are too many IF(s) they all are checked thus making tally to respond slow!
    I feel you may, try SWITCH instead, but then you will have to make optional fields but that will be one time activity and thus will improve the reusability and speed.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Split it up..........

    [System: Formula]
    myOwnColor : if $vTallyColoursv:Ledger:$PartyLedgerName = "Red" then "Red" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Blue" then "Blue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Green" then "Green" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "maron" then "maron" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "orange" then "orange" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "AmericanRose" then "AmericanRose" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "PowderedBlue" then "PowderedBlue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Coral" then "Coral" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "CandyApplegreen" then "CandyApplegreen" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "RosyBrown" then "RosyBrown" else @@myOwnColor2

    myOwnColor2 : if $vTallyColoursv:Ledger:$PartyLedgerName = "MediumPurple" then "MediumPurple" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "AzureMist" then "AzureMist" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Darkpink" then "Darkpink" else "black"
     


  7. Jenny

    Jenny Active Member


    if i split up then how to put in this field :

    [#Field: EI Consignee]
    Color: @@myOwnColor
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    as it is...... @@myowncolor............. once it exhaust myowncolor it will go to 2nd, then 3rd

    read the formula once again carefully....at the end it goes to second formula...and so on.

    So you need to specify only...... @@myowncolor.
     


  9. Jenny

    Jenny Active Member


    sorry sir...i got it...what you saying....thanx a lot.....
     


  10. m shiva

    m shiva New Member


    good morning sir, plz share code for ledger background color change.

    thank you
     


  11. parvez Ahmad

    parvez Ahmad New Member

    Attached Files:



Share This Page