Export records in file ascii

robertoberrobertober Member Posts: 8
edited 2009-01-14 in Navision Attain
I want to export records in file ascii.
How can I do?

](*,)

Comments

  • kapamaroukapamarou Member Posts: 1,152
    Look at dataports...
  • robertoberrobertober Member Posts: 8
    I looked at the dataport but have not found the solution would need instructions
  • ajhvdbajhvdb Member Posts: 672
    Then search for dataports :idea:
  • kapamaroukapamarou Member Posts: 1,152
    Dataports are used to import / export data... Read the documentation / help on this and we'll be happy to provide assistance for more specific issues (e.g. you built your dataport but something is wrong)...
  • robertoberrobertober Member Posts: 8
    Excuse me, I explained badly.
    I know what is a dataport, but I don't know how to use it to export a file in Ascii format.
  • kinekine Member Posts: 12,562
    Do you know what is Ascii? What do you think that you get when you use the dataport?

    Dataport IS creating ASCII file... :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • robertoberrobertober Member Posts: 8
    Sorry, but what kind of field delimiter ,fieldseparator ,RecordSeparator or other settings need to use
  • kinekine Member Posts: 12,562
    it is on you, that is not part of some ASCII definition. You do not need to change anything, you can use the default values. If you have some specification you need to cover, you need to set it according the specification... :wink:

    Still I think you do not understand what you want to know and thus we do not know how to help you. Can you be more specific and wrote more details about your task? May be it will help you to narrow your thoughts and it will give us more info...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • SavatageSavatage Member Posts: 7,142
    are you confusing "ascii file" with "text file"?

    The dataport allows you to set your own delimiters & seperators
  • robertoberrobertober Member Posts: 8
    I need to create an ascii file with these specifications:
    Record Separator (0D) ,in the end of record newline (0A).

    I don’t understand these specifications (0D) and (0A)
    and i don’t know how to export fields with fixed width

    Thanks for your cooperation
  • DenSterDenSter Member Posts: 8,307
    Not knowing about text files, and not knowing anyhting about dataports severely limits your ability to export data out to a text file. If you work for a NAV partner, now is the time to get a more senior person involved, so they can show you how this is done. If you work for an end user, you should get your NAV partner involved. Creating a straightforward dataport shouldn't take more than an hour or two.
  • SavatageSavatage Member Posts: 7,142
    you can start by reading PART 7-DATAPORTS in the application Designers guide

    http://download.microsoft.com/download/ ... 1w1adg.pdf

    I suggest printing it out & putting it into a folder
  • kinekine Member Posts: 12,562
    0D and 0A mean characters with hexadecimal value 0D and 0A - it means char 14 and 10 in decimal. But are you sure that the
    Record Separator (0D) ,in the end of record newline (0A)

    Because "newline" = 0D 0A (it means pair of characters 0D and 0A) and it means the default record separator which is used in dataport. It means that you do not need to change anything. Better will be to think about "field" separator which is in most cases ; or ,.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    kine wrote:
    Better will be to think about "field" separator which is in most cases ; or ,.

    But be sure, that there is as data in the fields that you are export / import no sign like your delimiter sign (here in the example ; ,)
    Use as FieldSeparator a charecter that is not used (for example ° or ^ or others). So the Dataport works well and you have no problems

    Regards
    Do you make it right, it works too!
  • robertoberrobertober Member Posts: 8
    I have another problem I can not align right numeric fields.
    Setting the starting position and the number he writes from the set position.
    how can I do
  • kinekine Member Posts: 12,562
    Look for OnAfterFormatField trigger of the Dataport field - there you can "right allign" the text if you want.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • robertoberrobertober Member Posts: 8
    What should I write code to align right?
    Thanks for your cooperation
  • kinekine Member Posts: 12,562
    Search the forum... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.