Envelope Printing Data not Printing....screen shot attached

Discussion in 'Tally Developer' started by purushothaman, Aug 9, 2020.

    
  1. purushothaman

    purushothaman New Member


    [#Form : LEDGER CONTACT]
    Button : Address Print

    [Button : Address Print ]

    Key : Ctrl + 5
    Action : Print Report : EnvelopePrint

    [Report : EnvelopePrint]
    Form : EnvPrintForm
    Object : Ledger
    Object : Voucher

    [Form : EnvPrintForm]
    Width : 100% Page
    Height : 100% Page
    Space Top : 3 inch
    Space Left : 4 inch
    Space Right : 0.5 inch
    Part : EnvPrintBody

    [Part : EnvPrintBody]
    Part : EnvPrintBodyTop

    [Part : EnvPrintBodyTop]
    Width : 100 % page
    Height : 3 inch
    Space Top : 0.5 inch
    Space Left : 0.5 inch
    Space Right : 0.5 inch
    Line : EnvelopeHead1, EnvelopeHead2, FullAddress, PhoneNumbers, EmailAdd
    Repeat : FullAddress:partyAddress
    Vertical : Yes

    [Line : EnvelopeHead1]
    Field : ToAddress, EnvelopeHead1
    Space Top : 1

    [Field : ToAddress]
    Use : Name Field
    Set as : "To,"
    Width : 15
    Align : Right
    Style : EnvStyleBOLD
    Space Left : 9

    [Field : EnvelopeHead1]
    Use : Name Field
    Setas : $Name:Ledger:$PartyLedgerName
    Width : 50
    style : EnvStyleBOLD
    Align : Left
    Object : Ledger

    [Line : EnvelopeHead2]
    Field : KindAttn, ContactPerson

    [Field : KindAttn]
    Use : Name Field
    Set as :
    Width : 15
    Align : Centre
    Style : EnvStyleNormal
    Space Left : 9
    PrintFG : Black

    [Field : ContactPerson]
    Use : Name Field
    Setas : $LedgerContact:Ledger:$PartyLedgerName
    Set Always : Yes
    Width : 50
    Style : EnvStyleNormal
    Align : Left
    Border : thin Bottom
    PrintFG : Red


    [Style : EnvStyleBOLD]
    Font : "Arial Bold"
    Height : 16
    Bold : yes



    [Line : FullAddress]
    Field : FullAddress

    [Field : FullAddress]
    Use : Name Field
    Setas : $Address
    Width : 50
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    Object : Ledger

    [Line : PhoneNumbers]
    Field : PhoneNumbers

    [Field : PhoneNumbers]
    Use : Name Field
    Setas : "Phone : " + $LedgerPhone:Ledger:$PartyLedgerName + " / " + "Mobile : " + $LedgerMobile:Ledger:$PartyLedgerName
    Width : 50
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    Object : Ledger

    [Line : EmailAdd]
    Field : EmailAdd

    [Field : EmailAdd]
    Use : Name Field
    Setas : "Email : " + $EMail:Ledger:$LedgerName
    Width : 50
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    Object : Ledger

    [Style : EnvStyleNormal]
    Font : "Arial Bold"
    Height : 12
    Bold : yes
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Use ................... #LedgerName
     


  3. purushothaman

    purushothaman New Member


    data not come....
     


  4. purushothaman

    purushothaman New Member


    please help to correct the error
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Wherever......$LedgerName or $PartyLedgerName ....... is there........... replace it with #LedgerName
     


  6. purushothaman

    purushothaman New Member


    Sir, Thankyou.... its worked
    but still Address not captured.... why? what's wrong in code?
     

    Attached Files:

    • PRINT.txt
      File size:
      2.4 KB
      Views:
      9
    • 01.jpg
      01.jpg
      File size:
      642.7 KB
      Views:
      41
    • 01.jpg
      01.jpg
      File size:
      642.7 KB
      Views:
      39


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $Address:Ledger:#LedgerName
     


  8. purushothaman

    purushothaman New Member


    Sorry, still Address not captured....
    ss.jpg 01.jpg ss.jpg 01.jpg ss.jpg 01.jpg ss.jpg 01.jpg
     

    Attached Files:



  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $$FullList:Address:$Address + " " + $LedStateName + " - " + $PinCode
     


  10. purushothaman

    purushothaman New Member


    Sorry sir, still Address not captured....
     

    Attached Files:

    • 01.jpg
      01.jpg
      File size:
      402.2 KB
      Views:
      40
    • 02.jpg
      02.jpg
      File size:
      217.7 KB
      Views:
      39
    • PRINT.txt
      File size:
      2.5 KB
      Views:
      8


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Code:
    ;;************  Coding by Purushothaman Rangarajan for LINGA CHEMICALS - AUGUST 2020  ************;;
    
    [#Form : LEDGER CONTACT]
    Button : Address Print
    
    [#Form : LEDGER VOUCHERS]
    Button : Address Print
    
    [Button : Address Print ]
    
    Key : Ctrl + 5
    Action : Print Report : EnvelopePrint
    
    [Report : EnvelopePrint]
    Form : EnvPrintForm
    Object : Ledger
    Object : Voucher
    
    [Form : EnvPrintForm]
    Width : 100% Page
    Height : 100% Page
    Space Top : 3 inch
    Space Left : 4 inch
    Space Right : 0.5 inch
    Part : EnvPrintBody
    
    [Part : EnvPrintBody]
    Part : EnvPrintBodyTop
    
    [Part : EnvPrintBodyTop]
    Width : 100 % page
    Height : 3 inch
    Space Top : 0.5 inch
    Space Left : 0.5 inch
    Space Right : 0.5 inch
    Line : EnvelopeHead1, EnvelopeHead2, FullList, PhoneNumbers, EmailAdd
    Repeat : FullList : PartyContactDetailsColl
    Vertical : Yes
    
    [Line : EnvelopeHead1]
    Field : ToAddress, EnvelopeHead1
    Space Top : 2
    
    [Field : ToAddress]
    Use : Name Field
    Set as : "To,"
    Width : 15
    Align : Right
    Style : EnvStyleNormal
    Space Left : 9
    
    [Field : EnvelopeHead1]
    Use : Name Field
    Setas : $Name:Ledger:#LedgerName
    Width : 50
    style : EnvStyleBOLD
    Align : Left
    Object : Ledger
    
    [Line : EnvelopeHead2]
    Field : KindAttn, ContactPerson
    
    [Field : KindAttn]
    Use : Name Field
    Set as :
    Width : 15
    Align : Centre
    Style : EnvStyleNormal
    Space Left : 9
    PrintFG : Black
    
    [Field : ContactPerson]
    Use : Name Field
    Setas : $LedgerContact:Ledger:#LedgerName
    Set Always : Yes
    Width : 50
    style : EnvStyleBOLD
    Align : Left
    
    
    
    [Style : EnvStyleBOLD]
    Font     : "Arial Bold"
    Height : 16
    Bold : yes
    
    [Line : FullList]
        Field : FullList
    
    [Field : FullList]
    Use : Name Field
    Setas : $Address
    Full Width  : Yes
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    
    [Line : PhoneNumbers]
    Field : PhoneNumbers
    
    [Field : PhoneNumbers]
    Use : Name Field
    Setas : "Phone : " + $LedgerPhone:Ledger:#LedgerName + " / " + "Mobile : " + $LedgerMobile:Ledger:#LedgerName
    Width : 50
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    Object : Ledger
    
    [Line : EmailAdd]
    Field : EmailAdd
    
    [Field : EmailAdd]
    Use : Name Field
    Setas : "Email : " + $EMail:Ledger:#LedgerName
    Width : 50
    Style : EnvStyleNormal
    Space Left : 25
    Align : Left
    Object : Ledger
    
    [Style : EnvStyleNormal]
    Font : "Arial Bold"
    Height : 12
    Bold : yes
    
    ;;************  Coding by Purushothaman Rangarajan for LINGA CHEMICALS - AUGUST 2020  ************;;                
    
    [Collection : PartyContactDetailsColl]
        Type        : Address   : Ledger
        Child of    : #LedgerName
    
    
    
                            
     


  12. purushothaman

    purushothaman New Member


    Sir,
    Thank You,
    its worked......
    Great help!
    Thank you once again!
     


  13. Sohail Khan

    Sohail Khan Member


    Please Help me in the Switch Attribute. I Want Site Address in the Sales And Purchase Voucher but in Ledger Voucher I want it to Print Office Address.
    The First Switch is working but second switch is not deleting the Site Address.

    Code:
    [#Form : Purchase Color]
        Button    : Address Print
    
    [#Form : Sales Color]
        Button    : Address Print
       
    [#Form : LEDGER VOUCHERS]
        Button : Address Print
    
    [Button : Address Print ]
    
        Key         :     Alt + W
        Action         :     Print Report    : EnvPrintRpt
    
    [Report    : EnvPrintRpt]
        Form        :     EnvPrintForm
        Object        :     Ledger
        Object        :     Voucher
        Variable:SVPrintOrientation:String
        Print Set             : SVPrintOrientation    : "Landscape"
        Print SET : SVPrinterName : "EPSON77D0AD (M200 Series)"
       
    
    
       
    [Form    : EnvPrintForm]
        Width        :    100% Page
        Height        :    100% Page
        Space Top    :    0 inch   
        Space Left    :    0 inch   
        Space Right    :    0 inch   
        Part        :    EnvLeading
       
       
            [Part: EnvLeading]
    
            Parts       :  LeftPart
            Right Parts    :    RightPart
            Vertical    : No
           
    
         [Part       :  LeftPart]
              Parts       :  EnvPrintPartyName, EnvPrintOffAdd    ,SiteAddresss
              Vertical    : Yes
              Width: 70% Page
              Switch: case7    :         DeleteOffAddress    : @@IsSales or @@IsPurchase
              Switch: Case7    :  DeleteSiteAddress    : Not(@@IsSales or @@IsPurchase)
            
              [!Part:DeleteOffAddress]
                  Delete:Part:EnvPrintOffAdd
                 
             [!Part:DeleteSiteAddress]
                  Delete:Part:SiteAddresss
     


  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    In .... [Part : LeftPart] where have you defined "SiteAddresss" ????

    Why go reverse LOGIC ???? Do it this way........

    [Part : LeftPart]
    Parts : EnvPrintPartyName
    Vertical : Yes
    Width: 70% Page
    Switch: case7 : AddOffAddress : @@IsSales or @@IsPurchase
    Switch: Case7 : AddSiteAddress : Not(@@IsSales or @@IsPurchase)

    [!Part: AddOffAddress]
    Add:part: After: EnvPrintPartyName: EnvPrintOffAdd

    [!Part: AddSiteAddress]
    Add:part: After: EnvPrintPartyName: SiteAddresss
     


  15. Sohail Khan

    Sohail Khan Member


    This Code Solved half of the problem. Now I am getting Office Address and Site Address both in ledger Report even though i have Specified ... Not ##IsLedgerReport
    Code:
         [Part       :  LeftPart]
              Parts       :  EnvPrintPartyName;, EnvPrintOffAdd    ,SiteAddresss
              Vertical    : Yes
              Width: 70% Page
              Option    :     AddSiteAddress    :  (@@Ispurchase Or @@IsSales) And not ##IsLedgerReport
              Option    :  AddOffAddress    : ##IsLedgerReport
     


  16. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Then define properly.......... what is @@IsSales and @@IsPurchase ????
     


  17. Sohail Khan

    Sohail Khan Member


    $$IsSales:##SVVoucherType and$$IsPurchase:##SVVoucherType
     


  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    that does not reflect the point that it is a Sales/Purchase register..........

    Remove that and simply put........ ##IsLedgerReport and NOT ##IsLedgerReport.
     
    Sohail Khan likes this.


  19. Sohail Khan

    Sohail Khan Member


    Sir i have tried this already before but it still gives me the Site address Part in the ledger vouchers.
    Although i have achieve my result with invisible att at field level but im curious how to achieve it part level without using invisible att.
     


  20. Sohail Khan

    Sohail Khan Member


    This Solved it.
    Code:
         [Part       :  LeftPart]
              Parts       :  EnvPrintPartyName, EnvPrintOffAdd    ,SiteAddresss
              Vertical    : Yes
              Width: 70% Page
              Option    :     AddSiteAddress    :   @@IsSalesVch or  @@IsPurchaseVch 
              Option    :  AddOffAddress    : ##IsLedgerReport
       
              
             
            
              [!Part:AddOffAddress]
                 Replace:Part:SiteAddresss:EnvPrintOffAdd
                 ;Add:Part:After:EnvPrintPartyName:EnvPrintOffAdd
                 
             [!Part:AddSiteAddress]
                 Replace:Part:EnvPrintOffAdd:EnvPrintOffAdd
                 ;Add:Part:After:EnvPrintPartyName:SiteAddresss
     


Share This Page