Exporting Header and Line records using Dataport

dadafolabidadafolabi Member Posts: 7
Dear All,

I want to export Sales Inv. Header and Sales Inv. Line tables from Dynamics NAV 2009 as .txt to feed a third party application. Since I cannot indent Sales Inv. Line under Sales Inv. Header in a dataport like we do in reports, how can I go around this using dataport to export.
Exported file should look like this:

Sales Inv. Header1
Sales Inv. Line1a
Sales Inv. Line1b
Sales Inv. Line1c
Sales Inv. Header2
Sales Inv. Line2a
Sales Inv. Line2b
Sales Inv. Line2c
Sales Inv. Header3
Sales Inv. Line3a
Sales Inv. Line3b
Sales Inv. Line3c

Please help! ](*,)

Comments

  • davmac1davmac1 Member Posts: 1,283
    You have posted in the wrong forum.
    While you could figure out a way to do this in a sql script, the easiest way is to write code to produce the file.
    You can write this code in a report if you dod not have a development license.
    Reports are an easy way since as you pointed out, the data is structured the way you need it.
    Open the text file on predataitem and close it on postdata item.
    write the code to create the text line in the aftergetrecord of each dataitem.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    [Topic moved from 'SQL General' to 'NAV/Navision Classic Client' forum]
Sign In or Register to comment.