Options

write items to text file with TAB as separator

Stijn_VUStijn_VU Member Posts: 4
I want to write data to a text file, but the fields must be separated by a horizontal TAB. How can I write a TAB to a text file in Navision?

Comments

  • Options
    pummipummi Member Posts: 17
    Take TAB key as char. Put Numerical Value( i think it is 11) to it.
    Take fiels and concatenate with this char and write to a text file

    If you need more help write to me

    Param
  • Options
    Stijn_VUStijn_VU Member Posts: 4
    Can you explain it in code? I don't know what you mean.
  • Options
    ngebhardngebhard Member Posts: 127
    Do you use a dataport or another file-export? If you use a dataport just enter <TAB> in the properties as the field separator.

    If your exporting the data by coding, use a global (for example TAB) defined as a char. Then you need this global to be filled with the ascii number of the tabulator. This is 09.

    In Coding:
    TAB:=09;

    Now you can use this global to separate the fields. If you're exporting the data just enter format(TAB) between the fields. For example:

    ....
    Export:='Item-No.: '+SalesInvLine."No."+' - '+SalesInvLine.Description+' '+SalesInvLine."Description 2"+FORMAT(TAB)+'Qty: '+FORMAT(SalesInvLine.Quantity)
    .....

    This should work!

    Greetz,
    N.Gebhard
    ProTAKT Projekte & Business Software AG
    Microsoft Dynamics NAV Partner
    Bad Nauheim, Germany
    http://www.protakt.de
    http://twitter.com/protakt
  • Options
    Stijn_VUStijn_VU Member Posts: 4
    Thanks, it's working!
Sign In or Register to comment.