Blank Space in text file

Discussion in 'Tally Developer' started by Arun Prasath, Jan 29, 2020.

    
  1. Arun Prasath

    Arun Prasath Member


    Dear Admin,

    I have written a function to generate a text file.

    From this function, I get below results
    0000ABCD123456789

    How I could change the function to get the below results.
    0000ABCD 123456789 (4 Blank spaces after ABCD"


    [#Form:Daybook]

    Add: Button: NGST Smp Export PC

    [Button: NGST Smp Export PC]

    Key : Ctrl + E
    Action : Call : DeleteWithTextFile
    Title : "Generate Text File"

    [Function : DeleteWithTextFile]

    010 : Open File : "D:"+"\"+"TextFile" + ".txt" : Text : Write
    015 : Truncate File
    025 : Write File Line : "0000" + $$String:"ABCD" + $$String:"123456789"
    040 : CLOSE TARGET FILE

    Thanks
     


  2. anish

    anish Member


    025 : Write File Line : "0000" + $$String:" ABCD" + $$String:"123456789"
     


  3. Bipin Damania

    Bipin Damania Active Member


    Try This

    025 : Write File Line : "0000" + $$String:"ABCD " + $$String:"123456789"

    Just give 4 space after "ABCD " or before " 123456789"
     


  4. Arun Prasath

    Arun Prasath Member


    Hi Anish,
    Actually I need to get the results as
    0000ABCD 123456789 (4 Blank spaces after ABCD). Let assume in one instance the value of the field (ABCD) get only "ABC" that time i need 5 Blank spaces. That means the Total width of that field is 7.
     
    Last edited: Jan 29, 2020


Share This Page