Hi, How can i export data of 2 tables that must be linked by some fields (ex.: Production Order and Production Order Line) to a .txt file using only one dataport. Thanks
Hi! Within one dataport you can insert multiple DataItems! Then, it depends on which NAVISION-Version you run: 2.x: You have no possibility to link DataItems (as in Reports), maybe you could “simulate” this by some codeing 3.x: You can link DataItems (Property “DataItemLink”), but then you have to use the “FileFormat” UPXML Otherwise, I would suggest to create a Report (where you can link DataItems) and write to a TXT-Filie by code … Regards, Jörg
Hi UOps. XML? Never tried that[:(]. But what about some variables as Dataport Fields? In this case Production Order should be the DataItem. Production Order Line is a record variable. On each header (OnBeforeExportRecord) filter your lines and fill the variables like:
POLine.Get(POHeader); MyVar1:= POLine.YourField1; MyVar2:= POLine.YourField2; Put the variables in the Dataport field window. This window then should looks like:
Enabled SourceExpr StartPos Width Yes YourPOField 0 0 Yes MyVar1 0 0 Yes MyVar2 0 0 bye André
Thank you for your suggestion
Also if there is not much data involved, just use a report to crate an Excel spreadsheet, and save it as required.
In OnPreDataItem you could copy the filters that the user has applied to the first data item - or write your own logic. Your output will have all of the records for the first data item, then the records from the second data item, etc. This is somewhat different from other accounting systems’ import files which will often have a format of: header detail detail header detail detail etc. Django
Hi What u can possibly do is use a report to copy the data from a excel file format to the ExcelBuffer table. ANd then use some coding to read the data from Excel Buffer table and insert it into the required table. Regards Akshay
You could put the header information on each detail line. You’d need to read the header of course and the receiving program would have to know what to do. regards, Dan.